is it possible to read the data from an external USB Sensor on CODESYS?
Like: sudo socat /dev/ttyUSB1,b9600 STDOUT
The command line will prdouce the following.
I want to read these Data directly in CODESYS from a weather station (USB from ELV) to control further devices an show the Data in a webViusu.
Thanks for your help
please try my attached project.
I've connected a usb to serial adapter, send via a windows terminal programm 'READ_USB' then
you execute the bREAD which get the data from char device.
This should work for your device too.
RaspberryPI_CharDeviceSnippet.project [149.71 KiB]
i used your solution in this topic:
l viewtopic.php?f=21&t=5699&hilit=serial l
This works well for me
Thanks for your support!
yes sure for serial communication this works,
in case you have any other char device under Linux - the example might be the choice.
Could you help me, please? I'm newbie in RaspBerry and in Codesys too, so trying to reading RS232 by RS232 to USB adapter when I open your example in CoDeSys V3.5 SP6 Patch3 I get the following errors:
Identifier 'CMPCHARDEVICE.RTS_IEC_HANDLE' not defined
identifer 'CmpCharDevice' not defined
My RaspBerry is PI 2 Model B
whenever you open an older project the procedure is the following:
1. Rightclick on the plc device in the device tree -> update device
In the projectsettings:
2.- use current Compiler Version
3.- use current visuprofile
this should solve these Problems (usually an older library is missing because in the old plc device the placeholder points to a not installed library version)
This should solve it.
many many thanks, works perfectly?
Log in to post a comment.