
6 No-protocol Mode
6-14
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
Program Example
z
ST
System-defined variable
Name
Data
type
Factory
setting
Comments
Details
_Port_isAvailable
BOOL
---
Network Communications
Instruction Enabled Flag
This flag is TRUE when there
are internal logical ports
available, FALSE when there
is no internal logical port
available.
Determining the SerialSend instruction execution completion
SerialSend instruction execution
Processing at normal end
Trigger reception
Communications parameters settings
SerialSend_instance.Done
Trigger
Operating
SerialSend_instance
InPort
Port
Execute
SendDat[0]
SrcDat
UINT#5
SendSize
Busy
Done
Error
ErrorID
ErrorIDEx
_Port_isAvailable
Barcode_P2_NopSerialSendExecSta SerialSend_instance.Busy
Operating
Operating
RS_instance
OperatingEnd
RS
Set
Q1
Reset1
OperatingEnd
SerialSend_instance.Error
Operating
SerialSend_instance.Done
Inline ST
Inline ST
1 StringToAry(In:='@READ',AryOut:=SendDat[0]);
//Preparation of SendDat[]
2 InPort.UnitNo
:=_eUnitNo#_CBU_No00;
//Serial Communications Unit, Unit number 0
3 InPort.PhysicPortNo:=USINT#2;
//Serial port 2
1 //Processing at
normal
end
2 ;
Processing at error end
Operating
SerialSend_instance.Error
Inline ST
1 //Processing at
error
end
2 ;
SerialSend