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.

iecstatuswindow_3391-20240521-001002.jpg

 

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.

image-20240206-222842.png

 

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

Â