Can I initialize PLC when it power on/off in Unity Pro S

timcph2008

Member
Join Date
Jul 2015
Location
United State
Posts
33
Hi guys, I want to initialize PIDFF controller when PLC power on or off.

I know that to reset the PIDFF, I need to trigger TR_S, and I try to use system bits %S13. However, it only reset the PIDFF when the PLC run/stop, not power on/off. Because when I power off the PLC, it still remain run after I power back on.

Do you guys have any idea?

Thank you for your help!
 
try system bits %S0, S1 and system word SW10.0

%S0 cold restart, normally "0" state
%S1 warm restart, normally "0" state
%SW10.0 first cycle after cold start (mast cycle, normally "1")

- put all to or block (%S0, S1 directly, %SW10.0 with invert) -> plc started bit??
 
Last edited:
Update: Sorry I forgot to set the input back to 0 when I use Reset-Set function block for testing... %S1 actually work, sorry for the stupid mistake
 
Last edited:
bits are "1" or "0" state only one scan. Maybe you need to add timer for resetting block. (Not sure if block needs "1" signal for several scans.)


Checked from program. Attachment's ton timer output will be "1" after 60 seconds of PLC start.



Note from help files:

"%S1 is not always set in the first scan of the PLC. If a signal set for every start of the PLC is needed, %S21 should be used instead"

start.jpg
 
Last edited:
bits are "1" or "0" state only one scan. Maybe you need to add timer for resetting block. (Not sure if block needs "1" signal for several scans.)


Checked from program. Attachment's ton timer output will be "1" after 60 seconds of PLC start.


Yes I need a timer for extend the signal. thank you!
 
bits are "1" or "0" state only one scan. Maybe you need to add timer for resetting block. (Not sure if block needs "1" signal for several scans.)


Checked from program. Attachment's ton timer output will be "1" after 60 seconds of PLC start.



Note from help files:

"%S1 is not always set in the first scan of the PLC. If a signal set for every start of the PLC is needed, %S21 should be used instead"


I try used TON, however. However, %S1 and %S21 set to 1 at first scan then reset to 0. TON is on delay, seems we should use TOF instead TON for extend the %S1 and %S21 signal.

%S1.png
%S21.png
 
Yed. Example which I posted delays start 60s on warm and cold restart. Ton Output is off 60s seconds after plc start.
AND block's output is "0" at first scan -> Ton timer start count time from second plc scan)


You can invert ton timer's output, so then bit is on when plc is started and off after 60s from plc start.

If you change timer, then you need invert and-block's output before TOF or TP-timer.
 

Similar Topics

When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
138
"Failed to Initialize the service {3F883B87-2208-11D4-B0E7-001083022E04}" Along with "Failed to load HMI Server Service" Hello, I am getting...
Replies
2
Views
716
Hey all, I have a local STRING tag inside of an AOI. I want to initialize it with a value INSIDE of the AOI. For example, @ First scan...
Replies
9
Views
1,632
Hello Everyone! New guy here posting first time. I'm kind of lost with this, when I open my excel file I got this error message. Any one that can...
Replies
0
Views
1,333
Hello, PLC rookie here working with an AB CompactLogix LI6ER in RSlogix 5000. So far I've only used structured text. I'm working on an...
Replies
9
Views
2,726
Back
Top Bottom