Action
Create an extended script to output data read from a barcode connected to the USB to a serial printer connected to COM1.
Commands Used
if ( )
When the "if" condition, enclosed in brackets "( )", is true, the expression following the "if ( )" statement is run.21.11.8 Conditional Expressions
Label Settings [r:EXT_SIO_RECV]
Shows the quantity of data (number of bytes) received at that time. The received data size is read-only.21.11.4 SIO Port Operation
Equivalent (==)
N1 == N2 True if N1 is equal to N2.21.11.9 Comparison
Text Settings (_strset)
A fixed string is stored in the data buffer.21.11.11 Text Operation
Extended Receive (IO_READ_EX)
Receives data of the size indicated in Received Data Size (bytes) from the Extended SIO and stores it in the data buffer.21.11.4 SIO Port Operation
From Data Buffer to Internal Device (_dlcopy)
Each byte of string data stored in the offset of the data buffer is copied to the LS area according to the number of strings.21.11.11 Text Operation
Label Settings [c:EXT_SIO_CTRL**]
This control variable is used to clear the Send buffer, Receive buffer, and error status.21.11.8 Conditional Expressions
Connect Text (_strcat)
A character string or character code is concatenated with the text buffer.21.11.11 Text Operation
Text Length (_strlen)
Obtains the length of the stored string.21.11.11 Text Operation
Extended Send (IO_WRITE_EX)
Sends the data in the data buffer with Extended SIO according to the size of Number of Send Bytes.21.11.4 SIO Port Operation
Assignment (=)
Assign the value on the right hand side to the left hand side.21.11.10 Operator
Addition (+)
Adds a constant to a Word device's data.21.11.10 Operator
Numeric Value Decimal String Conversion (_bin2decasc)
This function is used to convert an integer to a decimal string.21.11.11 Text Operation
From Internal Device To Data Buffer (_ ldcopy)
The data of the string stored in the LS area is copied to the data buffer according to the number of strings in a byte-by-byte transfer.21.11.11 Text Operation
21.5.1 Procedure - Communicating with Unsupported Peripheral Devices