Unity Pro Delay?

mosama

Member
Join Date
May 2009
Location
Egypt
Posts
182
Hi every one

I'm working with Unity Pro software for programming Schneider PLC. I want to make a delay using ST language. I don't mean on delay timer, I mean the program execution stops until delay is counted then the program continues.

I hope any one can help me.

Regards
 
You can stop any particular task section on a permissive - if you right click on the task section (see picture) and go to Properties->Condition you can add a bool in here to enable/disable this code section. I think this is what you want - I don't think you mean to turn the whole system off.

This way, you can have a Timer or whatever else in some master task and then enable/disable the code you want to run/stop as you see fit with the permissive bit.

11-24-2010 5-42-13 AM.png
 
Last edited:
Thanks for you replies

Actually I want to make a function block with the following I/O:
Inputs: 1- Start
2- NUM OF OUTS
3- Delay
Outputs: Array [1..10] of OUTS

When start is on out1 will be on then after a delay out2 goes on then delay then out3 ... and so on

I want to make a for loop like this

for x:=1 to 10 do
out[x]:=1;
(* delay here *)
end_for;

Regards
 
Last edited:
I cant see any valid reason why you wouldn't just use a timer delay, trying to do it any other way is just re-inventing the wheel for the sake of it.
 
Because the timer delay instruction requires several scans to execute the delay. I want the delay to be executed in on scan so it can be used in a for loop.
 
chud:
That's exactly what I want, the delay instruction in the PIC microcontroller.

tragically1969:
M340 BMX P34 2020 V2
 
You can easily create delay inside an ST section by using REPEAT instruction.

example
x := -1
REPEAT
x := x + 2
UNTIL x >= 101
END_REPEAT ;

Important Note: This will create a loop program and may cause WatchDog error to stop the PLC, if the total scan tim even exceeds the watchdog time. So it is not recommended to use this instruction for your appliation requirement. Your requirment can be better done using TON block.
 
iknowsomeplc:
Thanks for your help.
If there is a delay instruction it could be better.
 
Last edited:

Similar Topics

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
171
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
400
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
705
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,915
Hi, I've exported a PL7 application to the .FEF file succesfully. Imported the .FEF file in my Unity Pro project, but two of the five sections in...
Replies
0
Views
770
Back
Top Bottom