cobra_phil
Member
I am new to structured text programming and would like some help please.
I am programming a Q02H series PLC. I am sending out a UDP packet using the ZP.BUFSND command. The string I need to send to the equipment needs to be formatted like this "R1234G1234". The "R" can be one of "R", "G", or "O". And the "1234" can be from "0000" to "9999" which comes from an incrementing counter. By using the BINDA command, I have been able to get it to this format
"R 1234G 1234" using ladder programming. I think I can build the string using Structured Text, but I can't figure out how to move the string to a register. I was testing in ladder with this command "$MOV "R1234G1234" D101. What is the equivalent command in structured text? This command gives me an error "BMOV_M(B0,String1,10,D101)" as well as this command "BMOV_M(B0,"R1234G1234",10,D101). Thanks in advance for your help.
I am programming a Q02H series PLC. I am sending out a UDP packet using the ZP.BUFSND command. The string I need to send to the equipment needs to be formatted like this "R1234G1234". The "R" can be one of "R", "G", or "O". And the "1234" can be from "0000" to "9999" which comes from an incrementing counter. By using the BINDA command, I have been able to get it to this format
"R 1234G 1234" using ladder programming. I think I can build the string using Structured Text, but I can't figure out how to move the string to a register. I was testing in ladder with this command "$MOV "R1234G1234" D101. What is the equivalent command in structured text? This command gives me an error "BMOV_M(B0,String1,10,D101)" as well as this command "BMOV_M(B0,"R1234G1234",10,D101). Thanks in advance for your help.