Fielbus Bridge to serial

Topics about the Software of Revolution Pi
Post Reply
MdP
Posts: 4
Joined: 27 Jan 2025, 15:47

Fielbus Bridge to serial

Post by MdP »

Hi all,
We recently bought a RevPi Core S with profinet or profibus gateway.
Image
So we we want to control an High frequency generator with a PLC by Profinet Or Profibus. Our issue is that this generator can only be driven through serial UART.

Were I'm :
- bullseye installed and up to date
- I use pictory to configure the RevPi with it's 2 fieldbus cards
- piTest working and recognising both fieldbus cards

Serial can be made directly using USB or using a UsbToSerial converter : It will be ok using Python but what's the point with CODESYS ?
Please note that when I plus something in the USB I loose ethernet connection and I need to reboot the RevPi

Codesys : V3.5 SP20 (64 bit)
- I deploy "CODESYS Control for Raspberry Pi SL" and Edge Gateway for Linux (4.14.0.0) : both running in Operation view using Linux credentials
- On Device window I can see my RevPi after a Scan Network but I can't find the way where we can setup User name & password

I think that if serial can work with CODESYS ( can someone confirm please ? ) it's better that doing everything in python.

Questions :
- what could be the issue with the usb shutting down the ethernet connection?
- how can I connect to the device - reset credentials since I have the issue in a blank project as well as examples projects ?

Thank you very much for your help!

Marco
Attachments
RevPi_HiFqGen.png
RevPi_HiFqGen.png (11.8 KiB) Viewed 4597 times
MdP
Posts: 4
Joined: 27 Jan 2025, 15:47

Re: Fielbus Bridge to serial

Post by MdP »

Ok :
- I reinstall CODESYS V3.5 SP 20 Patch 5
- I re install RevPi linux Os from Bullseye to bookworm

Now I can connect and begin to work on the project itself
User avatar
dirk
KUNBUS
Posts: 2214
Joined: 15 Dec 2016, 13:19

Re: Fielbus Bridge to serial

Post by dirk »

Hi, please look at the documentation here: https://revolutionpi.com/documentation/codesys/
CODESYS changed the license model. Thus, the "Raspberry Pi" runtime is obsolete. There is also the CODESYS Checklist available here:
https://kunbus-gmbh.atlassian.net/servi ... 2687893508
This checklist contains links to further information on the CODESYS website.
MdP
Posts: 4
Joined: 27 Jan 2025, 15:47

Re: Fielbus Bridge to serial

Post by MdP »

thank you for that Dirk.

Any suggestion for making serial ( ttyACM0 on linux in ascii mode) with Codesys ?
Because if not we will jump into Python which is working and free




pi@RevPi110436:~$ udevadm info -q property -n /dev/ttyACM0
DEVPATH=/devices/platform/soc/fe980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0
DEVNAME=/dev/ttyACM0
MAJOR=166
MINOR=0
SUBSYSTEM=tty
USEC_INITIALIZED=8109050
ID_BUS=usb
ID_MODEL=SynthHD
ID_MODEL_ENC=SynthHD
ID_MODEL_ID=6668
ID_SERIAL=Windfreak_Technologies__LLC._SynthHD_206634714E56
ID_SERIAL_SHORT=206634714E56
ID_VENDOR=Windfreak_Technologies__LLC.
ID_VENDOR_ENC=Windfreak\x20Technologies\x2c\x20LLC.
ID_VENDOR_ID=1209
ID_REVISION=0200
ID_TYPE=generic
ID_USB_MODEL=SynthHD
ID_USB_MODEL_ENC=SynthHD
ID_USB_MODEL_ID=6668
ID_USB_SERIAL=Windfreak_Technologies__LLC._SynthHD_206634714E56
ID_USB_SERIAL_SHORT=206634714E56
ID_USB_VENDOR=Windfreak_Technologies__LLC.
ID_USB_VENDOR_ENC=Windfreak\x20Technologies\x2c\x20LLC.
ID_USB_VENDOR_ID=1209
ID_USB_REVISION=0200
ID_USB_TYPE=generic
ID_USB_INTERFACES=:020201:0a0000:
ID_USB_INTERFACE_NUM=00
ID_USB_DRIVER=cdc_acm
ID_USB_CLASS_FROM_DATABASE=Miscellaneous Device
ID_USB_PROTOCOL_FROM_DATABASE=Interface Association
ID_VENDOR_FROM_DATABASE=Generic
ID_PATH=platform-fe980000.usb-usb-0:1.3:1.0
ID_PATH_TAG=platform-fe980000_usb-usb-0_1_3_1_0
DEVLINKS=/dev/serial/by-path/platform-fe980000.usb-usb-0:1.3:1.0 /dev/serial/by-id/usb-Windfreak_Technologies__LLC._SynthHD_206634714>
TAGS=:systemd:
CURRENT_TAGS=:systemd:
User avatar
dirk
KUNBUS
Posts: 2214
Joined: 15 Dec 2016, 13:19

Re: Fielbus Bridge to serial

Post by dirk »

Well, I would prefer good old Python :D
https://revolutionpi.com/documentation/ ... commander/
MdP
Posts: 4
Joined: 27 Jan 2025, 15:47

Re: Fielbus Bridge to serial

Post by MdP »

Ok it's working with Codesys now using Syscom library.
We had to add the following in /etc/codesyscontrol/CODESYSControl_User.cfg and not in the CODESYSControl.cfg

[SysCom]
Linux.Devicefile.1=/dev/ttyACM0
portnum:=COM.SysCom.SYS_COMPORT1
Post Reply