I got a small problem which is troubling me. On my desk there is a USB barcode scanner, which shall be used with CoDeSys running on a Raspberry Pi (Kunbus Revpi device).
Sadly, it seems to be quite hard to implement it with CoDeSys.
The scanner acts like a keyboard (HID-Device), so I thought about reading the input to a string variable to process it later.
I thought about to ways of integrating it:
1) Get the string via the visualization and a text box. Sadly, I do not know how to tell CoDeSys to have the text box "in focus" all the time - I only found the way of focusing the text box with a mouse down action.
2) Use a (python) script on the Raspi which does the reading duties and then sends the data to CoDeSys. Sadly I do not know how to send the data from the script to CoDeSys.
If anyone could please help me, I would be very happy. Either with solving 1) or 2), it doesn't really matter - but I like the thought of getting it done with CoDeSys!
Thank you very much in advance!
All the best
here in the old forum are many examples,
as I remember you'll find the Bardcode stuff too:
I think this is it:
this is for 1)
2) even this there is an example how to excecute a python script an get the returnvalues.
If you have an solution would be great if you share your snippet/code/project
Nice, thank you very much! I did not find the post with all those projects. I'll dive into the resources you linked and report back.
If I manage to solve it properly I will post the solution as well.
Did you find a solution?
The solution with the RFID-Scanner works. I do not remember if I changed much, but just check out eschwellingers comment. I did not dive deeper into it, because the barcode scanner now gets read by a different system.
Log in to post a comment.