Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
here you have basically two options.
You can take a barcode scanner that is recongnized as a USB Keyboard.
Then you can use the normal Write Variable/Keyboard handling in
the CODESYS Visualization.
Alternatively you can use a Barcodescanner that has an integrated
USB-to-Serial converter, then you can establish a serial
connection to the device using either the CAA COM or SysCom library
and read out the what the scanner is sending.
Be aware that both methods need a PLC that does support these
interfacing features. Not all PLCs that have a USB Port will be able
to use it for a keyboard or USB-to-Serial connection.
Check this with your PLC manufacturer.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Like i already told your there are Barcodescanners
that have an integrated USB-to-Serial Converter
"Alternatively you can use a Barcodescanner that has an integrated
USB-to-Serial converter, then you can establish a serial
connection to the device using either the CAA COM or SysCom library
and read out the what the scanner is sending."
The plug remains USB, but it will be handled like serial connection.
Just Google it...
And again, only having the Barcodescanner is not enough,
you will also need a PLC that supports USB-to-Serial on its
USB Port.
Hello,
How can i get the data from a barcodescanner connected to USB
Hello Reinier,
here you have basically two options.
You can take a barcode scanner that is recongnized as a USB Keyboard.
Then you can use the normal Write Variable/Keyboard handling in
the CODESYS Visualization.
Alternatively you can use a Barcodescanner that has an integrated
USB-to-Serial converter, then you can establish a serial
connection to the device using either the CAA COM or SysCom library
and read out the what the scanner is sending.
Be aware that both methods need a PLC that does support these
interfacing features. Not all PLCs that have a USB Port will be able
to use it for a keyboard or USB-to-Serial connection.
Check this with your PLC manufacturer.
Thanks !
I Know. But most are USB Not Seriel.
So i want it like Seriel.. but then with USB
Like i already told your there are Barcodescanners
that have an integrated USB-to-Serial Converter
"Alternatively you can use a Barcodescanner that has an integrated
USB-to-Serial converter, then you can establish a serial
connection to the device using either the CAA COM or SysCom library
and read out the what the scanner is sending."
The plug remains USB, but it will be handled like serial connection.
Just Google it...
And again, only having the Barcodescanner is not enough,
you will also need a PLC that supports USB-to-Serial on its
USB Port.
Examples on how to use Serial in CODESYS are found
on the CODESYS Store:
https://store.codesys.com/serial-com.html
https://store.codesys.com/serial-com-with-visu.html
Great.. But why can't i read the data from USB
Its just data like seriel.
So if Windows can handle it, why can't i ?