Compact Logix Problem

Isnt is just:
Code:
FOR x:= 0 TO 31 DO;
	IF Source_DINT.[x] THEN
		Dest_DINT_Array[x]:= 1;
	ELSE
		Dest_DINT_Array[x]:= 0;
END_FOR;
 
KISS:


XIC Tag.0 OTE D[0].0
XIC Tag.1 OTE D[1].0
XIC Tag.2 OTE D[2].0
..
..
XIC Tag.31 OTE D[31].0


32 rungs but you could make a AOI out of it.
 
There's nothing inappropriate about brute force for a simple function like this. It's a very good opportunity to make use of the Add-On Instruction feature of ControlLogix.

Code:
If Source_DINT.0  Then Destination_DINT_Array[0] := 1 ; else Destination_DINT_Array[0] := 0 ; End_If ;

Ken,

I tried this as a test, created an AOI and it balked saying that the input & output tags for an AOI can not be dimensioned. And I tried to make Destination_DINT_Array a controller tag, but the AOI wouldn't see that as an available tag.

I don't have a lot of Studio5000 experience, so maybe I am missing something? I am using version 26.01.

Edit - I just looked at the latest posts and downloaded the structured text manual.
 
Last edited:
I could do an indirect rung, would take 32 scans to complete.

I am just doing brute force, at lease it will be easy to understand 3 months from now when someone is looking at it.

Thanks anyway.

I remember doing tasks like this in PLC5, which is why I couldn't figure this out in the logix PLCs

Why would you iterate once per scan? Complete the loop in a single scan. This simple loop will have no impact on your scan.
 
Ken,

I tried this as a test, created an AOI and it balked saying that the input & output tags for an AOI can not be dimensioned. And I tried to make Destination_DINT_Array a controller tag, but the AOI wouldn't see that as an available tag.

I don't have a lot of Studio5000 experience, so maybe I am missing something? I am using version 26.01.

Edit - I just looked at the latest posts and downloaded the structured text manual.

Try setting your array parameter as an InOut parameter, like so :

melMvHk.jpg
 
Last edited:

Similar Topics

My company is involved with the installation (no programming or panel construction on our part) of a Compact GuardLogix PLC system with Point...
Replies
14
Views
5,658
Hi, I am using L30ERM as my controller and 1769-IF4XOF2 as my analog input module. and Rslogix5000 I applied voltage (0 to 5 V DC)on my input...
Replies
9
Views
4,390
I am having a problem with the max value when using a numeric input on the PVP 600. I created the numeric input and I am able to change the value...
Replies
10
Views
3,992
Hi I am Using a Panelview plus 700 with compactlogix 1768-L43 . In my pc i am getting all animations & values when i m testing but i cant get the...
Replies
0
Views
2,000
Hello, I have an HMI running an Intouch 9.5 application. It is communicating with a compact logix PLC via an external I/O server. The Intouch...
Replies
2
Views
2,864
Back
Top Bottom