omron — 4-1-1 Program Structure

4 Implementation Example of Dynamic Pick-and-place Equipment In this equipment, Pack Manager sample is used to program the pick-and-place operation. If you use the Pack Manager sample, you can operate the robot by using the Process Manager func- tion of the IPC Application Controller. It eliminates the need to create complex programs for process- ing to work with peripheral devices. However, you need to make the V+ programs and C# programs to start or stop the Process Manager. Process Manager can be started or stopped by calling the C# program, which is executed by the IPC Application Controller, from the V+ program that is running on the Robot Integrated CPU Unit.

Process Manager's solenoid valve opening/closing instruction is written to outputs of V+ Digital I/O. They are assigned to the contacts of the EtherCAT I/O Slave by the V+ Digital I/O Settings function and are output from those contacts. Process Manager's conveyor drive ON/OFF instruction is written to the output of V+ Digital I/O. The V + program for regular processing, "control", polls for the status of the conveyor drive ON/OFF instruc- tion and writes it to the shared variable.

In addition, the sequence control program "ConveyerControl" polls for the shared variables, converts them to operational instructions (ON/OFF instructions, velocity command, and rotational directions), and outputs them to the inverter. This section describes the sequence control program to control the dynamic pick-and-place equip- ment. In the sequence control program, register global variables and create three programs, "Main" (main program), "ConveyerControl", and "RobotControl".  Global Variables Register the global variables that are used in the sequence control program. The following variables are automatically generated in the I/O Map tab page. Register the variables below yourself.

4-4 NJ-series Robot Integrated System Startup Guide (O049) Sequence Control Program Name Data type Comment E002 Command _ WORD Inverter run command E002 Frequency reference _ _ UINT Inverter target frequency E002 Status _ WORD Inverter status E002 Output frequency monitor _ _ _ UINT Inverter frequency monitor E002 Sysmac Error Status _ _ _ BYTE Inverter Sysmac error Name Data type Comment e conveyor dir _ _ BOOL Conveyor revere command e conveyor run _ _ BOOL Conveyor run command e conveyor spd _ _ BOOL Conveyor fast run command e is run mode _ _ _ BOOL Operation mode gRC Err _ BOOL Robot control error gReset BOOL Auto-operation stopped gStart BOOL Auto-operation started gSysOK BOOL Operation ready eBool exeT1 _ BOOL supervisor in execution gEnableT1 BOOL supervisor executable