0

trouble to receive Muxed Can messages

Codie 4 years ago in IQANdesign updated 4 years ago 4

Hello, I am using a MD4 to receive CAN message from and Inverter and the Can messages  are Muxed. So i have my application designed to receive the J1939 message and the first byte is the command bite it should then change a state machine in which allocates the data to the associated memory channel while in that state. What I'm finding is my command byte is changing but to fast to acknowledge. I have a can trace and i can see the multiple different messages of the same message being sent at different rates and with different priorities but my  command byte is not changing the state machine. Occasionally i get a value that has been received from a different command byte so the program must have worked but its very random. It reads the values sent at 10 ms and ignores the other messages with a longer send rate most of the time. Would yo have a suggestion on how to delay the time that receives the command byte in order to allow the memorizing channels to save. Or any suggestions for Muxed messages. File is attached below can trace

Image 2052

PD400 Status CAN.idex

Image 2055

Image 2056

+1

I would recommend using the Paged Protocol property and see if you have better results.  It seems like this is a built in feature that accomplishes what you need.

Do you have any more information on how the paged protocol works? I am not familiar with how it functions and the help files are not very explanatory.

+1

There is a brief description in the IQAN design help file, but basically, in your case the Page Mask property would be set to 0xFF (the first byte of the message) and then you'd specify the Page Value as the value you need to receive.  You would define individual JFIN channels for each page value you wanted to receive.

In your example application, you have your PGN Send State state machine channel.  For the first two states (Relative Speed / Torque and Voltage), i set up two sets of JFIN / JPOUT channels:

The properties for the Relative Speed / Torque JFIN channel would be set up as follows:

The paged protocol mask would be the first byte (0xFF) and then the value would be 121 (got this from your state machine channel).  You'd remove the Command Byte 1 JPIN channel, as it isnt needed anymore.

You can then use the JPIN channels directly as the signals in your application.  No need for the memorizing channels anymore.

Similarly, you would set up the Voltage JFIN channel like this:

and so on.  Hope this helps.

Thank you Edward I got it sorted. I was not aware of the Page mask and how it worked.Much simpler then my approach. Where are these Iqan Design Help files? I've only ever used the help files from the Iqan application.