2-663
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Communications Instructions
2
SerialSend
Determine if execution of the SerialSend instruction is completed.
Processing completed
Execution condition
Processing
Port settings
Send data
Accept trigger.
Execute SerialSend instruction.
Set communications parameters.
Inline ST
Inline ST
Inline ST
Processing after normal end
1 // Processing after normal end
2 ;
Processing after error end
1 // Processing after error end
2 ;
Variable Data type Initial value Comment
LD
OperatingEnd
Trigger
Operating
InPort
SendDat
RS_instance
SerialSend_instance
False
False
False
(UnitNo:=_CBU_No00, PhysicPortNo:=0)
[5(16#0)]
BOOL
BOOL
BOOL
_sPORT
ARRAY[0..4] OF BYTE
RS
SerialSend
SerialSend_instance.Done
SerialSend_instance.Error
SerialSend_instance.Busy
OperatingEnd
Operating
OperatingEnd
Trigger
_Port_isAvailable Barcode_P2_NopSerialSendExecSta
RS
Set Q1
Reset1
RS_instance
Operating
1 StringToAry(In:=’@READ’, AryOut:=SendDat[0]);
2 InPort.UnitNo :=_CBU_No00;
3 InPort.PhysicPortNo:=USINT#2;
// Prepare SendDat[].
// Serial Communications Unit with unit number 0
// Serial port 2
Operating
InPort
SendDat[0]
UINT#5
SerialSend
Execute Done
Port Busy
SrcDat Error
SendSize ErrorID
ErrorIDEx
SerialSend_instance
Operating
SerialSend_instance.Done
Operating
SerialSend_instance.Error
_Port_isAvailable
Barcode_P2_NopSerialSendExecSta
BOOL
BOOL
Variable Data type Comment
Network Communications Instruction Enabled Flag
SerialSend Instruction Execution Flag
Internal
Variables
External
Variables