Regarding the Previous message display in the string
Dear sir,
I am written a logic to display custume message(55 charactor length) in the HMI. I am used CONCAT Instruction to link the some pre defined message with the user given message, and written move instruction to clear the memory location to empty from %MW0.700 TO %MW0.740. While operation for the first message is dispalying correctly, for the second message with less number of charactors of first message it is dispalying as second message including first message.
Ex: msg-1 : I LOVE INDIA
msg-2 : HELLO
The first message dispalying correctly, for the second message it is dispalying as "HELLO E INDIA"
Please give a suitable solution.
I am attcached the PLC logic in that Rung no 418 to 436 is related to message logic
Answers
Hello,
I'm not quite sure if I understood correctly your question, but from your description it seems you are not clearing (empty) the message variables correctly.
The main principle in PLC is: The logic is executed from the top to the bottom and from the left to the right.
So the correct code logic have to be the following:
1. Clear your string variables by move an empty string to them
2. Fill the string variables with the necessary content, which depends on logic
3. Use CONCAT function to make a common message from both strings
Some simple example that I tested is below (at raws 2 and 3 add a binary logic that fill the both messages with pre-defined values, depending on bit logic for example):
Add new comment