How to Start the IEC PLC on Controller Power-up
Â
Start on Power-up
The ACR96XX can be set-up to run the IEC PLC programs when the power is applied to the controller. Use the following ACR flags to configure the start-up settings, using the ACR-View Terminal Emulator.
Â
To power-up with a COLDSTART:Â Â
SET16913
To power-up with WARMSTART
SET16913
SET16914
To power-up with HOTSTART
SET16913
SET16915
Â
After setting the bits above, enter ESAVE.
Â
ACR-View 6.2 and greater includes a utility to set as save these flags. Select the desired radio beyond in the IEC Status Window, then click save to send the settings to the controller.
Â
The AcroBASIC Defines editor can be used to store these settings with the project. The ESAVE command is sent to the controller automatically when the defines are downloaded from ACR-View.
Â
Acrobasic Commands
The following AcroBasic commands can be sent to the ACR to initiate the IEC PLC programs. These commands can be entered thru the ACR-View Terminal Emulator, included in an AcroBasic Program, sent from a dumb terminal or from a user created PC application via USB, Ethernet or RS232 communications. Any terminal prompt (SYS>, P00>, etc) will accept these commands.
Â
IEC COLDSTARTÂ Â
IEC WARMSTART
IEC HOTSTART
IEC HALT
Â
SET 16917Â Â : REM COLDSTART
SET 16918Â Â : REM WARMSTART
SET 16919Â Â : REM HOTSTART
SET 16916Â Â : REM HALT
Â
Start on Power-up using Acrobasic
In AcroBasic, PBOOT is used to designate programs that run when the controller powers on. It is important to note that IEC programs require approximately 50ms longer than AcroBasic to load from flash memory following a power cycle. If an AcroBasic program is used to start the PLC programs, a check should be made to be certain that the PLC is ready to run. BIT16901 (Valid Programs Present) indicates the IEC PLC is loaded and ready. Below is an example of using AcroBasic program.
Â
PROGRAM
PBOOT
INH 16901Â Â Â : REM wait for IEC code to load from flash
IEC COLDSTART
ENDP
Using Xpress HMI to start the plc.
Beginning with ACR-View 6.1.1, the IEC run flags are included in the auto-generated export tag list for 96xx controllers. These tags can then be used on buttons and indicator tools to monitor, start and stop the PLC engine in the ACR.
Name | Address | Data Type | Initial Value | Description |
IEC_No_Errors | ACR.ACR9640.BIT16896 | Bool | Â | IEC No Controller Errors |
IEC_Valid_Program | ACR.ACR9640.BIT16901 | Bool | Â | IEC Valid program present |
IEC_Running | ACR.ACR9640.BIT16909 | Bool | Â | IEC Tasks running |
IEC_Halt | ACR.ACR9640.BIT16916 | Bool | Â | IEC Halt Request |
IEC_ColdStart | ACR.ACR9640.BIT16917 | Bool | Â | IEC Coldstart Request |
IEC_WarmStart | ACR.ACR9640.BIT16918 | Bool | Â | IEC Warm Start Request |
IEC_Hotstart | ACR.ACR9640.BIT16919 | Bool | Â | IEC Hot Start Request |
Â