Create a ladder diagram and add variables
Create a ladder diagram and then add local variables to the rung. This sample program uses a 2080-L50E-24QVB controller. The HSC is supported in all L50E controllers.
Prerequisites
- Create aMicro800controller project and add a controller that supports HSC.
- The controller is offline.
To create a ladder diagram and add variables
- InProject Organizer, right-clickPrograms, and then selectNew program.
- InNew program, enter the program name, verify that the type isLadder diagram, and then selectCreate.
- Open the program by doing one of the following:
- Double-click the program.
- Select the program, and then select theEnterkey.
- Add a direct contact to the first ladder rung by doing one of the following:
- InToolbox, inSearch, enterXIC, and then drag it to the first rung in the language editor.
- InToolbox, double-clickXICto add it to the first ladder rung.
- Assign a variable to the direct contact.
- Right-click theXICinstruction, and then selectSelect variable.
- In the variable selector, select the<controller-name>navigation tab, and then double-clickGlobal Variables.
- In the global variable selector, select_IO_EM_DI_05, and then selectSelect.
- Add an HSC instruction by doing one of the following:
- InToolbox, inSearch, enterHSC, and then drag it to the right of the XIC instruction in the language editor.
- InToolbox, double-clickHSC, and then drag the added HSC instruction to the right of the XIC instruction in the language editor.
- InProject Organizer, under the program you created, double-clickLocal Variables.
- In the local variable gird, add the following variables:Local variablesVariable NameData TypeMyCommandUSINTMyAppDataHSCAPPMyInfoHSCSTSMyPLSPLSMyStatusUINTThe local variable grid looks similar to the following image:
Provide Feedback