Copy Array of 200 Sint to an Array of 1600 boolean

dr_snuggles

Member
Join Date
Aug 2022
Location
Germany
Posts
7
All,

i nto fully get it. I read trough some froums but not finaly make it running. so I try to ask. Hopefully anybody has the kindness to answers this hopefully easy questiosn

I have an array of SINT which comes out of a hardware module.
The array has size of 200 sint values

I need this in an array of 1600 boolean. Is there any copy logic i can use for this?

I can not use the "cps"-command this is faulted out by RS5000.

Thanks The Doc
 
I'm thinking you'd have to create a UDT with 1600 BOOL's. The COP/CPS will work with UDT's, not BOOL arrays directly.
 
Maybe I missunderstand, but I think this is exactly what i do.

If you check the picture I added.(I checked also CPS with same result)

OP20ConvAAD1:I.Data[60] --> Starting where the data
is located

AdjSiemensPLC.Data.fromSiem2Rock.Siemens_Alarms --> UDT of boolean[1600]

Length --> 1600 for the boolean values

Thanks
The Doc
 
The instruction help for COP/CPS doesn't show a BOOL as a supported data type for source or destination, so you probably won't be able to do this directly. I get "Invalid data type" when I try to use a BOOL tag (or element of a BOOL array) as the destination. You'll probably have to do some brute force bit banging to transfer the data over.


What's your end goal? What exactly are you going to do with the data in the BOOL array?
 
If the udt has only the 1600 booleans in it, can you CPS the SINT array to the UDT I.E. the UDT., not the boolean array in the UDT, as the destination?
 
I agree, treat the array of SINT like a contiguous block of data and copy it to the array of Bools configured as a UDT, it can't be done as a bool array but if the Bool array is a UDT it can.
 

Similar Topics

I am having to manipulate MB data in a compactlogix 5380. I need to copy the bit array from the TCP MB master into a matching bit array to use in...
Replies
13
Views
2,497
Hello! I am completely new to PLCs, so I apologize in advance if this is a dumb question. I have a device that sends out its data as a number of...
Replies
5
Views
2,121
Gents, I have a DB, that is an array of a UDT. This UDT has got a combination of INT's and REAL's. When an action is completed, I want to move...
Replies
11
Views
4,204
I am using v14 with a 1215 dc/dc/dc. I need to copy a 50 element array of strings to another 50 element array of strings. I can work it out for...
Replies
3
Views
3,997
Hello I am using RSlogix 5000 V15.0 I want to copy a tag i have created using my own Data type that is an array of 400 with 3 more tags in it...
Replies
2
Views
2,897
Back
Top Bottom