vahasa - 2023-12-19

Hi

I'm automation engineering student and I'm not yet quite familiar with CAN-bus.

What I am trying to achieve, to send two byte message via CAN from Epec display to Scott Drive inverter. I'm using code template made with Epec Multitool in Codesys 3.5

Problem i'm facing is that drive responds with same COB-ID. In multitool, you can create TPDO/RPDO. And depending on that, display either sends or only receives.

This is problem, because for parameter polling from drive, you need to send two byte request to 0x399 and drive responds with eight bytes. If request is longer, drive don't respond. 0x399 is currently setted as RPDO, so display doesn't send anything on startup and I made program that sends messages to 0x399 bytes 0 and 1 and bytes 3-7 are shown in display. If setted as TPDO, display send all eight bytes and therefor drive cannot respond. But, I think because they are defined as RPDO, display won't send message, although monitoring with Codesys, values are changed.

Question is, how should COB-ID be configured in Codesys, so it wouldn't automatically start to send message but would send when needed?