Breaking up .DATA into two arrarys

garlantm

Member
Join Date
Aug 2016
Location
Michigan
Posts
28
Hello All,

First of all I am using an AB Logix 5571 revision 30.

I am trying to use a FBC to tell me which slave is unplugged in order. The original Way that i did this was to move the .LEN from a string to a FBC where I could compare it in 3 arrays(please see the picture below). The problem I am now having is that what I need to compare is 64 bits and not 32 bits like the original program. To do this I had to move it form the .LEN of the string to the actual .DATA this gives me plenty of space but I cannot figure out how to divide it in half (use two FBC commands instead of 1).

Please note image 1 is how I would like to devide the .Data
image 2 is how this was done with the .LEN of a string
image 3 is how I would like to do it now. But it is not working

Thank you

1.PNG

2.jpg

3.jpg
 
Hello,

I do not really know how to make the picture bigger, But I will export the routine if that helps? If you cannot open it then please let me know and I will try to resize my pictures somehow.

Thank you,
 
I think your problem might be the COP instruction. The length in the COP instruction is based of the size of the destination elements. You are copying 4 dints worth of data into your dint array from the array of 4 sints. This will be smashing the other DINTs of destination array that you are trying to use as parameters in the FBC command.

Change the Length to 1. That will copy 4 bytes of data into the DINT.
 
Thank you Geoff, I ended up using a little different technique to get the data that worked. So I found out that when it was copying with a length of 2 it would just overflow into the next set of the array . Since with AS-I it is always 32 slaves it worked out perfectly(1 slave per bit of the DINT) . So for A slaves I am looking at the first array and for the B slaves I look at the 2nd array. These then are moved to the FBC for comparison when a problem is detected.

Thanks again,
Trent
 

Similar Topics

Hello, I am working on a SCADA system using Wonderware Intouch 2014 R2 and have a small glitch with the historical trend feature. Every time I...
Replies
5
Views
2,839
I know tabview is not a PLC but I also know that some of you use LabView for a HMI and data acquisition. We have at a !@#$% if a time with...
Replies
6
Views
4,297
I was listening to the radio today and a discussion about Simulation Hypothesis came on and it was quite intriguing and actually entertaining. I...
Replies
11
Views
2,049
Since I had to relocate, I've been working in new construction as an electrician, however my boss is definitely open to letting me take on...
Replies
9
Views
2,853
Hi Everyone, I need some method/tool/utility/software for breaking the password in Siemens S7-400 CPU. password protection level is 3(write/read)...
Replies
12
Views
7,010
Back
Top Bottom