nurchi - 2018-07-07

Hello, everyone.

I'm new to the world of CoDeSys, but not to Embedded programming.

I have found some examples of using J1939 protocol, but when reading a message, it expects an address (PGN/SA is "packaged" into the address)

My controller (TTControl, Hydac International, HY-TTC 32-CD-00-000) has dual CAN bus.

What I need to do is program it to act as a CAN passthrough device and for certain messages change a byte or two (I need to make a joystick "pretend" to be a pedal).

I can receive messages from particular devices (CAN ID) and can modify the message and send it on the bus, but I cannot receive a raw message (the full 29 bit ID plus up to 8 bytes of data or something close to that) so if it's not a message of interest, I could pass it through.

I would appreciate some sample code and a library referenced.

The CoDeSys version is 2.3

Thanks.