Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Transmitting multiplexed signals USB-8502

I tested it with your code and it works like expected.

 

One thing I noticed is that mode value 2 is for the signal PS5_Bat1VoltTarget, which is not in your output signal list. Writing mode value 2 won't update any signals or output anything.

 

If I set the mode value to 1 for the corresponding PS5_Bat1VoltStop signal, it is transmitted ok and is received ok on the bus monitor and in a CAN Signal Input Single Point example used as a receiver for the frame. 

 

If I have the CAN Signal Input Single Point example to capture both PS5_Bat1VoltStop and PS5_Bat1VoltStart.... I start this example first and leave it running. It shows 0, 0 at start. I then run your example code with the mode value set to 1 and when I click "Update Values" the PS5_Bat1VoltStop is updated as expected and PS5_Bat1VoltStart remains zero. When I stop your program, change back to mode 0, and start it again (while leaving the receiving example running)... The PS5_Bat1VoltStart is not updated and the other value remains the same. 

Jeff L
National Instruments
0 Kudos
Message 11 of 13
(585 Views)

Hello Jeff,

 

Thanks for your reply.

I have spent lots of time on solving the problem but failure.

Could you help me check the program in attachment.

The new program is different to the example.

Thanks again.

 

Kai

0 Kudos
Message 12 of 13
(582 Views)

The new code you have attached looks like it should work to me. I notice you don't propagate the error wire through the while loop so I would recommend implementing proper error flow. Since both the input stream and output stream are on the same interface, you only have to set the baud rate once. Interface properties are shared across all sessions on an interface.

 

The top loop doesn't do anything so I am assuming that it is simply stub code reserved for future development.

Jeff L
National Instruments
0 Kudos
Message 13 of 13
(565 Views)