Micrologix 1100 - How to mplement this PLC-5 rung?

All the Micrologix PLCs are equiped with a S:4 register, which will give exactly 10000 counts per second.
Using the following logic, you will produce a perfectly accurate one second pulse.
GEQ S:4 10000 BST OTE B3/0 NXB SUB S:4 10000 S:4 BND

You can skip the subtraction by using the MEQ instruction.

MEQ S:4 3FFFh 10000 OTE B3/0

(edit)
This will do what the OP wanted:
MEQ S:4 3FFFh 10000 BST OSR B3/0 B3/2 NXB OSF B3/1 B3/3 BND
BST XIC B3/2 NXB XIC B3/3 BND OTE B3/4
 
Last edited:
Alaric said:
You can skip the subtraction by using the MEQ instruction.

MEQ S:4 3FFFh 10000 OTE B3/0
My puny tired old brain is at a complete loss trying to understand how this can work.
The odds of getting the clock equal to 10000 at any scan is quite low, so it will pass without ever being true. I don't see how masking with 3FFFh can fix this.

By doing the subtraction, whatever is left over in S:4 is the accumulated error from the scan time. So the scan time is taken into account next time S:4 is greater than 10000.

Also, without the subtraction, S:4 will return to zero upon overflow, which will throw the time out. Using the mask 3FFFh, it will still overflow at 16383.


Using GEQ S:4 10000 BST OTE B3/0 NXB SUB S:4 10000 S:4 BND is perfectly accurate on average (+- 100us), for use within the program, as it will vary only by the time within the scan, but you can be sure that the next scan after a second has passed, your output (B3/0) will be true for only one scan without the need for a one shot.

Of course if you want exacly one second action, use an interupt routine, but that is not good for using within the program, as a one shot is no good in an interupt routine.

I have been using this code for many years since the introduction of Micrologix 1000, for accurate timing. With Micrologix 1000, S:4 only has 100 counts per second.
 
Last edited:

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
124
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
527
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
193
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,194
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,407
Back
Top Bottom