Micrologix 1100 - functions/loops/subroutines?

ryrzu

Member
Join Date
Feb 2013
Location
Gdańsk
Posts
24
Hello,
Basic question i believe:
Is it possible to create functions/loops/subroutines that can be used on different data files.

Example:
I have ladder program that use modbus communication to read data from 3 modbus slaves. I need to calculate average value of 60 readings so i use ADD to accumulate data and then DIV to get average. Its nice and simple but when i have like 100 tags like this and 3 devices i really could use some loop/function/subroutine that can be used 300 times with different ADD and DIV source file.
Currently i manually copy & paste DIV and ADD rungs and change addresses L31:0 -> L31:1 -> L31:2 and so on... it will take forever.

If it's not possible in mlx 1100 is it possible in 1400?
 
Hallo ryrzu,

not directly. But you can use a variable as index,
an then use adressing like N7:[N7:31]
See attached image.

Best regards,
crawler009

test.jpg
 
It sounds like you will want to use indirect addressing on the file number portion of the address, i.e. L[N7:0]:1, where N7:0 is 31 in your example. Put all of your add/div rungs into a separate subroutine, then use JSR to execute it when you're ready to do the averaging (after setting N7:0 to the correct value).
 

Similar Topics

Hi, I cannot find the DLCA1764.EXE utilty software for data retrieving. Can someone share the link to download this software. Thanks!
Replies
4
Views
119
I am currently backing a Micro Logix 1100 and no-one seems to have the file for me to upload from. Is there a way for me to upload the project off...
Replies
15
Views
520
I am trying to set up a read message in a MicroLogix1100 to read the value of a DINT in a ControlLogix5561. I have successfully set up a message...
Replies
2
Views
190
Hello, I have an existing application that has a Powerflex 700 with a 20-COMM-E adapter controlled by a Micrologix 1100 via Ethernet. The setup...
Replies
6
Views
1,193
I have a MicroLogix 1100 and it's capable of ac or dc output voltages. What I don't know is how I'm supposed to tell the 1100 to use dc for the...
Replies
13
Views
1,405
Back
Top Bottom