Pack 2 Bytes into 1 Word Micrologix 1500LRP

ddnnis

Member
Join Date
Oct 2008
Location
Rochelle
Posts
92
I am working on an RFID project that will write Micrologic integer value to an RFID tag. The RFID system is the Turck BLCDN RFID SLICE. It communicates via Devicenet. I have mapped it to the scanner and all works well. It will allow me to write and read 4 words with no issues. The problem is that I need to write and read at 5 values. Two of the word values are under (255 decimal, hence 1 BYTE). If I could pack these 2 values as one word I believe this would solve my issue. Long story short can anyone help me on how to pack 2 Byte's into 1 Word on the Micrologix 1500LRP. I will also need to unpack them when I read the RFID tag.
Any help would be much appreciated.
Thanks
 
One approach would be to use the SWP instruction to swap the low and high bytes of one of the words, which would put the 8 data bits on the high end and 8 zeros on the low end. Then use a masked move MVM or OR instruction to combine the swapped word with the remaining value, and you'd have two 8-bit values stored in one 16-bit word. I've never personally used the SWP instruction but after reading the help file it seems like it should work.
 

Similar Topics

Hi, We have been facing a issue with SCADAPack 474. Configuration is like below. RTU 474 + 6103 PS + 5606 IO Mix Module + 5414 DI Module Only...
Replies
0
Views
54
I am using Schneider elau pack drive servo motor ISH-100. I am facing the problem that On the ISH -100 red light is blinking and pack drive C-600...
Replies
0
Views
83
Has anyone already worked with ALTOPACK equipment, model AVE-PC (VFFS). Year 2009, I need to do a retrofit for this equipment, has anyone already...
Replies
0
Views
70
Hi All, If i have the original project for TIA Portal V13sp1. the SoftPLC is running in V13sp1 in a 1515sp Win7 industrial PC. I was not able to...
Replies
6
Views
1,545
Hi People, I have a ScadaPack 330E that has been sitting on a shelf for a few years (previously working), and have recently re-installed...
Replies
4
Views
1,819
Back
Top Bottom