Page 2 of 2

Re: Codesys and gateway integration

Posted: 07 Dec 2020, 13:26
by daniel.correa
Hello Amar,

Step 1 was completed successfully, but when i press scan for devices on step 2, the profibus gateway is not shown.

As additional testing, when i manually configured Profibus in Pictory and then executed "Scan devices", the gateway module appeared on the list. Yet, no communication with the module could be established from Codesys.

Quick question, what Codesys version are you using?

Thank you

Re: Codesys and gateway integration

Posted: 07 Dec 2020, 15:55
by dirk
Hi daniel, my collegue amar provided some results to me inernally:
I've noticed, when I login from Codesys with Download, the Profibus module vanishes from piTest -d (it was there before logging in from Codesys)

This is because:
RevPi Codesys Project downloads a new config.rsc file (like the one created by pictory) on application startup. Therefore one shall not use pictory to create a configuration when using codesys.


Module state under Gateway_PROFIBUS > Module state = 0x00
means the Gateway is offline and offline LED shall be blinking with RED color. Refer Gateway documentation.
Now we have an answer to the other issue you mentioned here - RevPi Connect not saving changes in Pictory:
viewtopic.php?f=6&t=2563#p9336

Re: Codesys and gateway integration

Posted: 07 Dec 2020, 19:01
by daniel.correa
Hello Dirk, you're correct. The issue from the other topic is solved. The configuration was being overwritten by Codesys runtime. I detailed our findings there in case someone has the same issue.

After that test, i reinstalled Codesys runtime. After downloading Codesys' application, the Profibus gateway vanished again (on Pictory, piTest -d and inside the _config.rsc file).

Pulling the logs and checking _config.rsc file's timestamp, I can see that the times match.
after-codesys-runtime-install.png
after-codesys-runtime-install.png (238.16 KiB) Viewed 6941 times
Definitely Codesys is not configuring the Profibus gateway correctly.

Re: Codesys and gateway integration

Posted: 08 Dec 2020, 13:11
by Amar
Hi Daniel,
I am attaching a link of Codesys Project where the Gateway device configuration download and identification with piTest works. Please test it at your side. Also could you please send me your configured Codesys Project over KUNBUS customer support for further investigation.

Link:
https://kunbusgmbh-my.sharepoint.com/:u ... A?e=sYfDQe

Regards,
Amar

Re: Codesys and gateway integration

Posted: 08 Dec 2020, 13:29
by daniel.correa
Hello Amar,

I can't download the attachment, says my email doesn't belong to Kunbus' group. Could you please fix permissions for this file?

Thank you.

Re: Codesys and gateway integration

Posted: 08 Dec 2020, 13:41
by Amar
Hi Daniel,
Sorry for the link issue. Please try with this link.

https://kunbusgmbh-my.sharepoint.com/:u ... w?e=sa70xh

Re: Codesys and gateway integration

Posted: 08 Dec 2020, 15:39
by daniel.correa
Hello Amar,

Everything worked fine using your configuration. Codesys warned me that its version (and other libraries) were outdated. I ignored the warning and ran the program anyway.

I will try to replicate your Codesys environment and try my old configuration on it. I will let you know when I reach some conclusions.

Thank you very much for your attention (and Dirk's).

Re: Codesys and gateway integration

Posted: 08 Dec 2020, 15:51
by Amar
Hi Daniel,
Thats good! The project which I had send you is with version 3.5.16.20.I think in your project, the codesys device tree node has Ethernet node before the Rev Pi connect node and that might well perhaps be the cause of that issue.
In general you can add devices to Codesys tree in following sequence
Root device (Codesys control for Raspberry Pi) -> RevPi Connect -> Ethernet - PN Controller

Regards,
Amar

Re: Codesys and gateway integration

Posted: 12 Jan 2021, 10:35
by paolo.moraschetti
Hello Amar, could you please share the Codesys project that manage the Profibus Gateway device?If is it possible could you please send me the archive of project to this email:
p.moraschetti@pilz.it?
Thank you very much