EIO:CFG_1.0::

EIO_UNIT:
-Name SW_BOARD1 -Type eip000 -Bus SIM -Address 10 -Digin 16 -Digout 16
-Name SW_BOARD2 -Type eip000 -Bus SIM -Address 11 -Digin 16 -Digout 16
-Name SW_SIM_BOARD -Type eip000 -Bus SIM -Address 12 -Digin 16 -Digout 16

EIO_USER_SIGNAL = EIO_SIGNAL:
# Signals for all gun equipments
# DI external equipment signals
-Name force_complete -Unit SW_SIM_BOARD -Type DI -Phsig 4 -Length 1
-Name skip_proc -Unit SW_SIM_BOARD -Type DI -Phsig 5 -Length 1
-Name reweld_proc -Unit SW_SIM_BOARD -Type DI -Phsig 6 -Length 1

#######################################
# Signals for gun equipment1, Servo gun
#######################################
# DO process signals
-Name g1_process_run -Unit SW_SIM_BOARD -Type DO -Phsig 7 -Length 1
-Name g1_process_fault -Unit SW_SIM_BOARD -Type DO -Phsig 8 -Length 1 -Store

# DI gun signals
-Name g1_weld_contact -Unit SW_BOARD1 -Type DI -Phsig 4 -Length 1
-Name g1_flow1_ok -Unit SW_BOARD1 -Type DI -Phsig 5 -Length 1 -FiltAct 300
-Name g1_flow2_ok -Unit SW_BOARD1 -Type DI -Phsig 6 -Length 1 -FiltAct 300
-Name g1_air_ok -Unit SW_BOARD1 -Type DI -Phsig 7 -Length 1 -FiltAct 300
-Name g1_temp_ok -Unit SW_BOARD1 -Type DI -Phsig 8 -Length 1
-Name g1_equipment_ok -Unit SW_SIM_BOARD -Type DI -Phsig 7 -Length 1

# DO gun signals
-Name g1_equalize -Unit SW_BOARD1 -Type DO -Phsig 1 -Length 1 -Store

# DI weld timer signals
-Name g1_weld_complete -Unit SW_BOARD1 -Type DI -Phsig 1 -Length 1
-Name g1_timer_ready -Unit SW_BOARD1 -Type DI -Phsig 2 -Length 1
-Name g1_weld_fault -Unit SW_BOARD1 -Type DI -Phsig 3 -Length 1

# DO weld timer signals
-Name g1_start_weld -Unit SW_BOARD1 -Type DO -Phsig 2 -Length 1
-Name g1_enable_curr -Unit SW_BOARD1 -Type DO -Phsig 3 -Length 1 -Store
-Name g1_reset_fault -Unit SW_BOARD1 -Type DO -Phsig 4 -Length 1
-Name g1_parity -Unit SW_BOARD1 -Type DO -Phsig 5 -Length 1 -Store
-Name g1_weld_power -Unit SW_BOARD1 -Type DO -Phsig 6 -Length 1
-Name g1_start_water -Unit SW_BOARD1 -Type DO -Phsig 7 -Length 1

###########################################
# Signals for gun equipment2, pneumatic gun
###########################################
# DO process signals
-Name g2_process_run -Unit SW_SIM_BOARD -Type DO -Phsig 9 -Length 1
-Name g2_process_fault -Unit SW_SIM_BOARD -Type DO -Phsig 10 -Length 1 -Store

# DI gun signals
-Name g2_weld_contact -Unit SW_BOARD2 -Type DI -Phsig 4 -Length 1
-Name g2_flow1_ok -Unit SW_BOARD2 -Type DI -Phsig 5 -Length 1 -FiltAct 300
-Name g2_flow2_ok -Unit SW_BOARD2 -Type DI -Phsig 6 -Length 1 -FiltAct 300
-Name g2_air_ok -Unit SW_BOARD2 -Type DI -Phsig 7 -Length 1 -FiltAct 300
-Name g2_temp_ok -Unit SW_BOARD2 -Type DI -Phsig 8 -Length 1
-Name g2_pressure_ok -Unit SW_BOARD2 -Type DI -Phsig 9 -Length 1
-Name g2_equipment_ok -Unit SW_SIM_BOARD -Type DI -Phsig 8 -Length 1
-Name g2_gun_open -Unit SW_BOARD2 -Type DI -Phsig 10 -Length 1
-Name g2_hlift_open -Unit SW_BOARD2 -Type DI -Phsig 11 -Length 1

# DO gun signals
-Name g2_equalize -Unit SW_BOARD2 -Type DO -Phsig 1 -Length 1 -Store
-Name g2_close_gun -Unit SW_BOARD2 -Type DO -Phsig 8 -Length 1
-Name g2_open_hlift -Unit SW_BOARD2 -Type DO -Phsig 9 -Length 1 -Store
-Name g2_close_hlift -Unit SW_BOARD2 -Type DO -Phsig 10 -Length 1 -Store

# DI weld timer signals
-Name g2_weld_complete -Unit SW_BOARD2 -Type DI -Phsig 1 -Length 1
-Name g2_timer_ready -Unit SW_BOARD2 -Type DI -Phsig 2 -Length 1
-Name g2_weld_fault -Unit SW_BOARD2 -Type DI -Phsig 3 -Length 1

# DO weld timer signals
-Name g2_start_weld -Unit SW_BOARD2 -Type DO -Phsig 2 -Length 1
-Name g2_enable_curr -Unit SW_BOARD2 -Type DO -Phsig 3 -Length 1 -Store
-Name g2_reset_fault -Unit SW_BOARD2 -Type DO -Phsig 4 -Length 1
-Name g2_parity -Unit SW_BOARD2 -Type DO -Phsig 5 -Length 1 -Store
-Name g2_weld_power -Unit SW_BOARD2 -Type DO -Phsig 6 -Length 1
-Name g2_start_water -Unit SW_BOARD2 -Type DO -Phsig 7 -Length 1

EIO_SYSTEM_SIGNAL = EIO_SIGNAL:
# Signals used in the process kernel. Don't change the names or remove
-Name do_dummy -Unit SW_SIM_BOARD -Type DO -Phsig 1 -Length 1
-Name di_dummy -Unit SW_SIM_BOARD -Type DI -Phsig 1 -Length 1
-Name go_dummy -Unit SW_SIM_BOARD -Type GO -Phsig 2 -Length 1
-Name gi_dummy -Unit SW_SIM_BOARD -Type GI -Phsig 2 -Length 1
-Name ext_override -Unit SW_SIM_BOARD -Type DI -Phsig 3 -Length 1
-Name motor_on -Unit SW_SIM_BOARD -Type DO -Phsig 5 -Length 1
-Name cycle_on -Unit SW_SIM_BOARD -Type DO -Phsig 6 -Length 1

EIO_GROUP_PHS = EIO_SIGNAL:
# Signals for gun equipment1
# GO weld timer signal
-Name g1_weld_prog -Unit SW_BOARD1 -Type GO -Phsig 10 -Length 7

# Signals for gun equipment2
-Name g2_weld_prog -Unit SW_BOARD2 -Type GO -Phsig 11 -Length 3
-Name g2_press_group -Unit SW_BOARD2 -Type GO -Phsig 14 -Length 3

EIO_CROSS:
# Cross connected signals for gun equipment1
-Lact "g1_flow1_ok & g1_flow2_ok & g1_air_ok & g1_temp_ok" -Lres "g1_equipment_ok"

# Cross connected signals for gun equipment2
-Lact "g2_flow1_ok & g2_flow2_ok & g2_air_ok & g2_temp_ok" -Lres "g2_equipment_ok"

# Cross connected signals for all gun equipments
-Lact "skip_proc" -Lres "ext_override"
-Lact "reweld_proc" -Lres "ext_override"

SYSSIG_OUT:
-Status MotOnState -Signal motor_on
-Status CycleOn -Signal cycle_on
