Unity Pro XL Bit Shift

rankhornjp

Member
Join Date
Dec 2008
Location
Georgia
Posts
241
I'm converting a RsLogix program that has several BSL instructions with a length of 48. I have found that Unity has a ROL and SHL instructions that shifts bits. However, it looks like I'm limited to a DWORD(32 bits) in length and the DWORD won't let me reference it at the bit level (e.g. "DWORD.0" as the address on a coil) so that limits me to a WORD(16 bits).

Any suggestions on how to get something to work with 48 bits?


Thanks
 
Thanks. This works, in a slightly more complicated way. The downside is it uses 48 memory words instead of 3. Is there a more efficient way to track a part through 48 stations?
 
You can build your own DFB block.
Block will use still 48 ints internally, but you have cleaner look of code.
Unity have so much memory that using 48 integer <> 48 bits won't make much difference.
 

Similar Topics

I created an DINT array in Unity Pro. How do I get to the bit level? DINT_rcv expands to DINT_rcv[0] & DINT_rcv[1] but I want to address a bit at...
Replies
3
Views
2,317
I have to check 1024 (sequential) bits for change of state in any of the bits and record which bit changed. I was going to do something like...
Replies
9
Views
4,479
Hi Gents, I am new to Unity Pro and have to work in Funciton block. I have worked extensively in ladder with Ge-Fanuc. I am trying to find an...
Replies
2
Views
4,145
Where are you? Where do you find the system bits? In short all I want to do is set this bit to zero so I can remove the memory card! Surely I...
Replies
1
Views
2,308
Hello, I am using Unity pro V15. I have Quantum CPU 671 and Ethernet NOE 77101 configured. I have configured IO scanning on NOE. I have attached...
Replies
5
Views
175
Back
Top Bottom