Unity Pro XL Programming Questions

cnemeth

Member
Join Date
Jan 2014
Location
Manitoba
Posts
5
Hi Everyone,

My name is Chris and the reason I'm posting to this forum is because of some questions I have regarding Schneider Electric's Unity Pro XL programming software. Although I'm familiar with motor control ladder logic as well as programming languages such as C++, I'm having a little difficulty with the terminology they use regarding their timers as well as how to use them. My questions are as follows:

1. What does a timer's PHASE refer to and how does it work?
2. Do all timers require a PRESET value and how does it work?
3. Does a timer have to be set up under both the MAST task and the Event related tasks?
4. Do all the parameters of the timer have to be used in order to make it function?

I'm looking to learn how to program the timers using function block programming, and what I'm looking for specifically is something that will function as a START/STOP timer. I need it to start at 0 and retain its value as well. I've looked into it and come across some documentation on the ITCNTRL (see link below) timer, but I can't seem to get it to work as I anticipated. I think part of the problem is that I'm not exactly clear on how all the parameters work. That said, if any knows of an easy-to-understand timer I can use that's specifically designed for such an application, please feel free to let me know.

Lastly, I've managed to create my own START/STOP timer using structured text programming. It uses a REAL to measure the elapsed time, and the timer is triggered by an ON (1)/OFF (0) flag variable; the variable is initialized at 0.0 and, once triggered, is incremented by the duration of the MAST task cycle on each successive iteration of the cycle. When the flag value is set back to 0, the time stops counting and is rest to 0.0. So far its worked great. The only flaw is that I have to hard-code the value of the MAST cycle into the programming rather than retrieve it dynamically from the system information. What I'd like to be able to do is dynamically retrieve the TIME BASE from the system information and place it in a variable, then use that information to tell the program to increment by this or that amount depending on the value of the variable.

Any insight into these questions would be much appreciated. Thank you very much in advance.

Regards,
Chris

ITCNTRL Timer Link:

http://www.downloads.schneider-elec..._docTypeGroupFilter=4868250&p_docId=311395986

(Page 107)
 
Theres some "blank" spots in your explanation. Could you elaborate on " I need it to start at 0 and retain its value as well"
What value must be retained? Also just explain what you are trying to do with the timer
 
Further Details on What I'm Trying to Do

Hi Chud,

Thanks for the reply. I'm basically trying to time the duration of a process, then use that time information to determine subsequent instructions for the program. Specifically, I'm trying to emulate a box moving past a photoelectric sensor. When the sensor is blocked, I want the timer to start counting; when the sensor is unblocked, I want the timer to stop counting. The reason I mentioned the whole 0 to X number of seconds is because I've come across some timers that sound like they count down from a specific predefined time, which would make the program a little more complicated when it comes to calculating the duration of the process.

The timer I originally was trying to use was the ITCNTRL Timer because it seemed to have all the parameters I needed, but I've since figured out a way to do it using a combination of a TOF and TON timer. I posted another thread yesterday where I explain it. Here's the link:

http://www.plctalk.net/qanda/showthread.php?t=84771

I hope that helps. Even though I managed to figure out how to program the process myself, I'm still curious as to whether there is a prepackaged function in the Standard library that will perform the same job. If you know of one, I'd love to find out about it. Thanks again for your reply.

Regards,
Chris
 
I'm still curious as to whether there is a prepackaged function in the Standard library that will perform the same job. If you know of one, I'd love to find out about it.
It seems that this is much to do about very little. See picture. While the sensor is blocked, simply move or copy the timer accumulated time to a storage location. The value at N7:0 is always the last accumulated time.

If the PLC software has a Retentive-type timer (as RSLogix does), then only the first rung is needed. The RTO retained time is maintained until the timer is reset with the RES instruction.

Retentive Time from Non-retentive Timer- CNemeth .JPG
 
Last edited:
Hi Chud,

Thanks for the reply. I'm basically trying to time the duration of a process, then use that time information to determine subsequent instructions for the program. Specifically, I'm trying to emulate a box moving past a photoelectric sensor. When the sensor is blocked, I want the timer to start counting; when the sensor is unblocked, I want the timer to stop counting. The reason I mentioned the whole 0 to X number of seconds is because I've come across some timers that sound like they count down from a specific predefined time, which would make the program a little more complicated when it comes to calculating the duration of the process.

The timer I originally was trying to use was the ITCNTRL Timer because it seemed to have all the parameters I needed, but I've since figured out a way to do it using a combination of a TOF and TON timer. I posted another thread yesterday where I explain it. Here's the link:

http://www.plctalk.net/qanda/showthread.php?t=84771

I hope that helps. Even though I managed to figure out how to program the process myself, I'm still curious as to whether there is a prepackaged function in the Standard library that will perform the same job. If you know of one, I'd love to find out about it. Thanks again for your reply.

Regards,
Chris
Has anyone come across a prepackaged function within the Standard library of PLC programming that optimizes the duration of a process based on a photoelectric sensor input, thereby simplifying the program logic for such applications?
 

Similar Topics

Hi, i cant turn on the output coil in a ladder program http://prntscr.com/eofrvi does anyone know what im doing wrong? :bawling::bawling:
Replies
2
Views
2,477
Hello there i am looking for some advanced program examples of unity pro if anybody can help me out.
Replies
7
Views
6,366
Hi everyone, My name is Chris and I'm pretty new to PLC programming. I am currently in the midst of trying to teach myself how to program...
Replies
1
Views
8,115
Hi all, I'm a PLC beginner,I'm using Premium Hot standby Plc with Unity pro M software .I have few basic doubts regarding programming which are as...
Replies
2
Views
3,791
First of all, Good day to all!!! I'm only new here, and a newbie on automation. Now, I'm looking for any help to start programming & diagnostic...
Replies
8
Views
17,944
Back
Top Bottom