Kkula
Hi. when i started adding MQTT to my system i first did it in LAD to make sure it worked, which it did. So now i wanted to convert it to SCL but now im getting:"Error assigning local data in ob 31 - processing will continue (no ob processing)" when i try and run my code. Ive attached images of my working LAD, and how the datablock works, when converted it into SCL this is my test code:
its placed inside of a Cyclicinterrupt with a 10000 cycle time
IF #Initial_Call THEN
"Data_block_1".control.Enable := TRUE; // Start the MQTT client
"Data_block_1".control.Subscribe := TRUE; // Subscribe to the topic
END_IF;
"LMQTT_Client_DB"(enable := "Data_block_1".control.Enable,
publish := "Data_block_1".control.Publish,
subscribe := "Data_block_1".control.Subscribe,
unsubscribe := "Data_block_1".control.Unsubscribe,
qos := "Data_block_1".QOS,
retain := "Data_block_1".retain,
publishMsgLen := "Data_block_1".Send_msg_lenght,
willMsgLen := "Data_block_1".wiil_lenght,
timeOut := T#10s,
valid => "Data_block_1".Feedback.Valid,
done => "Data_block_1".Feedback.Done,
busy => "Data_block_1".Feedback.Busy,
error => "Data_block_1".Feedback.Error,
status => "Data_block_1".Feedback.Status,
diagnostics => "Data_block_1".Feedback.Diagnostics,
receivedMsgStatus => "Data_block_1".Received_Msg_status,
receivedMsgDataLen => "Data_block_1".Received_Mes_lenght,
connParam := "Data_block_1".ConnectionParam,
clientIdentifier := "Data_block_1".clientID,
username := "Data_block_1".username,
password := "Data_block_1".password,
willtopic := "Data_block_1".wiil_topic,
willMsgPayload := "Data_block_1".wiill_message,
mqttTopic := "Data_block_1"."Current Topic",
publishMsgPayload := "Data_block_1".Message_To_Send,
receivedTopic := "Data_block_1".Received_Topic,
receivedMsgPayload := "Data_block_1".Received_Message);
Our flexible community website is a platform that allows users to connect, share information, and collaborate on various topics of interest. The website offers a range of features such as discussion forums, messaging, user profiles, event calendars, and more. Users can customize their experience by creating and joining different groups or communities based on their interests or location. The website is designed to be user-friendly and adaptable to the needs and preferences of our diverse user base. Whether you are looking to network professionally, share hobbies and interests, or simply connect with like-minded individuals, our flexible community website has something for everyone. Join us today and become a part of our thriving online community!
India
Copyright ©2026
Share this page with your family and friends.