Rockwell Data Type Conversion

Saul#75

Member
Join Date
Jul 2013
Location
Leicester
Posts
11
I have found a BOOL array [64] and I would like to convert it to a DINT array [2] and I'm struggling. I've tried MVM, FFL, CPT, COP, MOV to no avail as I keep getting data type mismatch.
It's in a 1756-L72 running RSLogix 5000 v20
Any pointers would be appreciated.
 
Saul,

To be able to copy/convert a BOOL[64] array in RsLogix to DINT[2], you need to make an UDT that contains the array (I.E. one member that is of type BOOL[64]. From there you would create a tag of said UDT type. You could then copy this tag to a DINT[2] tag and set the length of 2 in the COP/CPS instruction.

I hope this helps.

-Nathan
 
Saul,

To be able to copy/convert a BOOL[64] array in RsLogix to DINT[2], you need to make an UDT that contains the array (I.E. one member that is of type BOOL[64]. From there you would create a tag of said UDT type. You could then copy this tag to a DINT[2] tag and set the length of 2 in the COP/CPS instruction.

I hope this helps.

-Nathan

Like your solution....
But I like more simple... redefine the Bool[64] into a dint[2] and manipulate bits as dint[x].y
it may save copy or data handling...
 
I tend to agree with JGax, steer clear of naked BOOL arrays whenever you can, there is really not a lot you can do with them.

If you must have a BOOL array, then making it a member of a UDT (as already suggested) opens up so many possibilities, including the ability to COP, CPS, FLL etc. Whenever I do this, I make the BOOL array member name something like "number", or "index", so if my UDT tag is called MyBitMap, I would address a single BOOL as MyBitMap.number[274] or MyBitMap.index[274]
 
When I saw the BOOL array my heart sank. I couldn't understand why you would do this instead of a DINT array.
I didn't want to risk changing the BOOL into a DINT array incase it also required changes to SCADA and other external applcations so the UDT has worked really well with the minimum of disruption. :D
 

Similar Topics

Is it possible to gather OPC data through a 1783-NATR? Searching around, it sounds like OPC data might be blocked by any NAT... Is there any work...
Replies
2
Views
241
We have a product we are now building and are planning on using RFID tags to ID trays of product as they move through the process (5 individual...
Replies
6
Views
1,418
I have seen posts about the Rockwell FactoryTalk ME DataStore Plus ActiveX control to save historical data to a CSV, but frankly the caveats seem...
Replies
4
Views
1,838
I'm using the latest Rockwell CCW to program a Micro 850 and Panelview PV800 - 2711R HMI. I'm having difficulties getting the Panelview HMI tags...
Replies
1
Views
1,814
Hi there, Can anyone suggest the solution to communicate between AB Compactlogix L36ERM controller(Which is having remote flex IOs over ethernet)...
Replies
9
Views
3,583
Back
Top Bottom