EG engineer
Member
I have a C-More HMI that changes my PLC String from "Machine Status" to "aMhcni etStasu" .
There is an option with other objects that have string to"Byte Swap" but that option doesnt exsist with a multistate text indicator.
So my question is; What is the best way to byteswap an ascii String in the PLC?
I understand there is a Byte swap instruction(SWPB) but this only works with a integer. And using the String to Dint instruction(STOD) then Dint to String(DTOS) isnt an option because my string only contains ascii characters.
Obviously I could use an A**load of "MID" and "CONCAT" instructions to get there I just feel like there has to be a better way!
I was really starting like like these HMI's before I ran into this issue.
Cheers!
There is an option with other objects that have string to"Byte Swap" but that option doesnt exsist with a multistate text indicator.
So my question is; What is the best way to byteswap an ascii String in the PLC?
I understand there is a Byte swap instruction(SWPB) but this only works with a integer. And using the String to Dint instruction(STOD) then Dint to String(DTOS) isnt an option because my string only contains ascii characters.
Obviously I could use an A**load of "MID" and "CONCAT" instructions to get there I just feel like there has to be a better way!
I was really starting like like these HMI's before I ran into this issue.
Cheers!