Page 1 of 1

Codesys

Posted: 10 Mar 2019, 08:03
by hence.persson
Hello.

I might want to use your product with Codesys but I have some questions.

1. Does the CanOpen GW work with Codesys? (Is it socketcan compatible)

2. Do you have a recommended UPS as I want the Persistent variables to work.

3. I need Modbus RTU, Modbus TCP and CanOpen to work. So I was thinking of the RevPi Connect as this one has a RS485 port. Any other things to consider?

Re: Codesys

Posted: 11 Mar 2019, 08:46
by dirk
Hi 1) For SocketCAN use the new RevPi Connect with the new RevPi Con CAN. Today we have the RevPiLib as a testing solution without support for you until we have a real product. We currently do not know if this library works out of the box the with this module. 2) no we don't have a preferred solution 3) yes the connect is perfect for RS485. Regarding the GW-Modbus RTU see 1)

Re: Codesys

Posted: 11 Mar 2019, 09:34
by hence.persson
So if I understand correctly. The RevPi Con CAN I can use with socketcan? If so I think I wouldn't need your library as Codesys supports SocketCAN.

Re: Codesys

Posted: 12 Mar 2019, 08:08
by dirk
Yes, it is SocketCAN compatible. See the tutorial here: https://revolution.kunbus.com/tutorials ... ansteuern/
Regarding Codesys is sure another way but we cannot guarantee or give you support for this - at the moment.

Here are the other tutorials about the Con CAN Module
https://revolution.kunbus.com/tutorials ... i-con-can/
https://revolution.kunbus.com/tutorials ... n-connect/
https://revolution.kunbus.com/tutorials ... chliessen/

Re: Codesys

Posted: 12 Mar 2019, 17:21
by hence.persson
The RS485 port on the RevPi Connect is that accesible from /dev/ttyUSB0 or is it another device?

Re: Codesys

Posted: 13 Mar 2019, 08:12
by dirk
No, it is /dev/ttyRS485

Re: Codesys

Posted: 13 Mar 2019, 14:54
by hence.persson
For info:

In CodesysControl_User.cfg

I add these lines and then it works. (It doesnt work with /dev/ttyRS485)

[SysCom]
Linux.Devicefile=/dev/ttyUSB


If I do a cat /dev/ttyRS485 and compare with a cat /dev/ttyUSB0 I get the same output.


Now its the next problem that I get a lot of timeouts on my RS485 Modbus RTU network but I guess that is because of poor cabling (no connected ground, small testwires etc.)