Omron NX-series User Manual page 97

Hide thumbs Also See for NX-series:
Table of Contents

Advertisement

Option Board Specification
Instructions to send a Modbus-RTU command specify an Option Board by using variables assigned to
the Option Board.
Example of specifying an Option Board with OptionBoard1_location_information
variable assigned to it
Serial port specification
Operating
NX_ModbusRtuCmd instruction
execution
Operating
OptionPort
OptionBoard1_location_information
Refer to 3-2-4 Assigning Device Variables to Option Boards on page 3-11 for assigning variables to
Option Boards.
Option Board Status
To use serial communications instructions, program the .Run (Option Board Normal Operation) mem-
ber of the _PLC_OptBoardSta (Option Board Status) system-defined variable as an interlock condition
in the user program.
Example of executing a Send Modbus RTU General Command instruction to an Option Board
mounted on Option Board 1 using the Option Board Normal Operation as an interlock condition
Operating
_PLC_OptBoardSta[1].Run
Refer to the NJ/NX-series CPU Unit Software User's Manual (Cat. No. W501) for the specifications of
the _PLC_OptBoardSta (Option Board Status) system-defined variable.
NX-series NX1P2 CPU Unit Built-in I/O and Option Board User's Manual (W579)
Inline ST
OptionPort.DeviceType:=_eDEVICE_TYPE#_DeviceOptionBoard;
OptionPort.OptBoard:=OptionBoard1_location_information;
OptionPort.PortNo:=1;
Execute
OptionPort
DevicePort
SlaveAdr
Address of remote slave
CmdDat
Command to send
CmdSize
Size of command to send
RespDat
Received data
Option
Abort
Variable that specifies target port
Variable assigned to Option Board
_PLC_OptBoardSta[1].Run
OptionPort
Address of remote slave
Command to send
Size of command to send
Received data
Option Board Normal Operation of Option Board 1 Status
system-defined variable
4 Serial Communications
NX_ModbusRtuCmd_instance
NX_ModbusRtuCmd
Done
Busy
CommandAborted
Error
ErrorID
RespDat
ErrorIDEx
RespSize
NX_ModbusRtuCmd_instance
NX_ModbusRtuCmd
Execute
DevicePort
SlaveAdr
CommandAborted
CmdDat
CmdSize
RespDat
Option
Abort
Done
Busy
Error
ErrorID
RespDat
ErrorIDEx
RespSize
4
4 - 23

Advertisement

Table of Contents
loading

Table of Contents