Studio 5000: Swap Byte in structure

taylor1982

Member
Join Date
Aug 2011
Location
Bavaria
Posts
78
Hello everybody,

I have a communication to a Linux-PC via sockets. So I created a quite large UDT with all the content.
Unfortunately we have to swap the low and highbyte. Of course there is the SWPB instruction. But it seems to me that this is not applicable for structures (?)

Can you give me some advices how to solve this?

Thanks a lot!
 
There is no easy way to solve your problem. You could store 2 copies of the UDT. One your store in the normal way and the other one swapped. This means two writes must be done when updating the UDT but then the swapped UDT doesn't have to have every word swap byte before sending. The swapped byte UDT can just be sent.
 

Similar Topics

I want to know how to make a flip flop rung that will change states every scan. This is for a fast sequencer. Is there a special bit similar to a...
Replies
8
Views
2,186
Hi Everyone. Not posted on here for a long time, but I am hoping someone can help me. I am doing a differential pressure calculation in a L27ERM...
Replies
15
Views
238
Hi, how do I convert 2x Integer registers to a Real? The two integers are from Modbus registers that contain a floating point value, I need to...
Replies
2
Views
119
What is the best way to extract the hour and minute from the register that comes from Yaskawa VFD. In studio 5000 I have a register saved as INT...
Replies
3
Views
123
I have an Allen Bradley temperature switch that I am trying to use in studio 5000. I am getting the message "Unable to interpret the IODD file"...
Replies
0
Views
74
Back
Top Bottom