Unity Pro XL Ending Timers Early

ControlP

Member
Join Date
Jul 2014
Location
Michigan
Posts
24
Hello I have a question for those familiar with Unity Pro.
I have a TOF when the rung goes false the Q bit stays set to 1 until the preset time runs out. There are times when that rung goes false that I would like to end the TOF early. By moving the Preset (PT) into the elapsed time (ET). With the Rockwell software I am more familiar with you can move the preset in to the accumulated time to end a timer early. I am having a hard time figuring out how to do this in Unity.
If anyone else has ran into this scenario I would like to hear how you did to make this work.

Thanks.
 
Since it's an IEC timer that means it's a function block. If this is a major issue then I recommend growing your own. That way you can give it all of the functionality you want.

Good luck,

Yosi
 
I am working on my first Unity Pro program and found this to be a learning exercise for me. From what I can gather, you cannot write directly to the ET like you can the .ACC in AB. Like Lare suggested, move a 0 into the PT, but wait, there's more!

In IEC, PT and ET are of the TIME Data Type. Time's default time base is in ms. You will want to make your desired preset a DINT variable and use a DINT_TO_TIME function. Your actual PT variable will be a TIME data type.

Below is a snap shot of the ladder version I came up with. I'm sure it can be done more elegantly. Easy enough to "roll your own" FB though. I hope this helps.

Early_TOF.jpg
 

Similar Topics

Greetings, I'm using Unity Pro v8 (131118) with Modicon M340. I cut my teeth on PLCs with Modicon back in the early 90s but this is my first...
Replies
2
Views
2,652
Hello, I am using Unity pro V15. I have Quantum CPU 671 and Ethernet NOE 77101 configured. I have configured IO scanning on NOE. I have attached...
Replies
5
Views
177
HELLO MY FRİENDS ı have problem. ı tought you can solved thıs problem for me. First of all When I checked all the cable connections of the...
Replies
0
Views
402
Hi All, I haven't installed Unity Pro in years and needed to install it recently. I initially tried installing Version 11.1 and the whole...
Replies
3
Views
713
Hello i want to implement a Read_var / Write_var functions to communicate with a modbus tcp device at the moment i use the unity simulator at the...
Replies
4
Views
1,927
Back
Top Bottom