2 Instruction Descriptions
2-660
NJ-series Instructions Reference Manual (W502)
* “#” denotes the port number on the Serial Communications Unit.
Refer to the following manual for details on no-protocol communications.
• CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit (Cat. No. W494)
• Execution of this instruction is continued until processing is completed even if the value of Execute
changes to FALSE or the execution time exceeds the task period. The value of Done changes to
TRUE when processing is completed. Use this to confirm normal completion of processing.
• Refer to Using this Section on page 2-2 for a timing chart for Execute, Done, Busy, and Error.
• You can use this instruction only for a Serial Communications Unit’s serial port that is set to No-proto-
col Mode.
• Nothing is sent if the value of SendSize is 0. When the instruction is executed, the value of Done
changes to TRUE.
• Even when attaching a start or end code, do not include it in the value of SendSize.
• The instruction is executed only when there is an available port. Therefore, use the system-defined
variable _Port_isAvailable (Network Communications Instruction Enabled Flag) in an N.O. execution
condition for the instruction.
• The instruction is not executed while Busy is TRUE. Therefore, use Busy in an N.C. execution condi-
tion for the instruction.
• You cannot execute this instruction while the SerialSend Instruction Executing Flag (semi-user-
defined variable P#NopSerialSendExecSta) is TRUE. Use P#NopSerialSendExecSta in an N.C. exe-
cution condition for the instruction.
• If the instruction is used in ST, make sure that the instruction is processed each task period as long
as instruction execution continues. Otherwise, normal processing is sometimes not possible.
Related System-defined Variables
Name Meaning Data type Description
_Port_numUsingPort Number of Used Ports USINT This is the number of ports that are currently used.
_Port_isAvailable Network Communica-
tions Instruction
Enabled Flag
BOOL TRUE: A port is available.
FALSE: A port is not available.
Related Semi-user-defined Variables
Name Meaning Data type Description
P#_NopSerialSendExecSta* SerialSend Instruction
Execution Flag
BOOL TRUE: Execution of the SerialSend instruction
is in progress.
FALSE: Execution of the SerialSend instruction
is not in progress.
P#_NopStartCodeYNCfg* No-protocol Start Code
Enable
BOOL TRUE: Start code
FALSE: No start code
P#_NopEndCodeYNCfg* No-protocol End Code
Enable
BOOL TRUE: End code
FALSE: No end code
P#_NopCRLFCfg* No-protocol CR LF
Specification
BOOL TRUE: CR+LF
FALSE: No CR+LF
P#_NopStartCodeCfg* No-protocol Start Code USINT 16#00 to 16#FF
P#_NopEndCodeCfg* No-protocol End Code USINT 16#00 to 16#FF
Additional Information
Precautions for Correct Use