The answer is yes, it’s possible to use the serial lines to manage the bar code reader. As you can see in many posts of this forums, by using the ST language you can develop programs that manage serial strings. The SlimLine ARM7 CPU module doesn’t have a USB host connector, so it’s possible to connect only serial devices.
The function Sysfopen, file open, allow to open the serial port as a data stream, use is: Fp:=Sysfopen(‘COM0’, ‘rw’);
The function Sysfgetc, get character from file, receives the character from the serial line, use is: Ch:=Sysfgetc(Fp);
The function SysVarsscanf, extracts values from string, extracts values from the received string, use is: i:=SysVarsscanf(ADR(InputString), ‘Value:%d’, UDINT_TYPE, ADR(Variable));
Many other functions and FBs allow to manipulate the received data, and to create the command frame to be sent out. All the informations about functions and FBs availablecan be reached in the SlimLine system IEC61131-3 programming manual.
Please refer to these post for more information and program examples (Post a, Post b).