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,210
Hello everyone, I'm new here, I hope someone can help me. I've been trying to install EDS files to my Studio 5000 with the EDS tool installer but...
Replies
3
Views
81
Hi Everyone, I am facing an issue while installing the STUDIO 5000 in my windows 10 PC. During installation I am getting an error that " Error...
Replies
4
Views
162
I am connecting to a remote device. When attempting to upload I receive an error that states: Error: Auto_Functions: The Import was aborted due...
Replies
3
Views
172
Back
Top Bottom