09-24-2019 12:06 AM - edited 09-24-2019 12:35 AM
I am using NI-XNET and I have a frame (Signal A, B,C) set as cyclic data. I would like to transmit it and sometimes I need to update the value of signal A in that frame. After a while, I would like to update value of signal B and update it to the current frame which included value of signal A.
How can I do that?
Thank you for your supports in advance.
09-24-2019 01:36 AM
If you used a .dbc or .xml to organise your CAN frames? If so, use XNET Write.vi in Signal Single-point mode to transmit your signals. You just do that only once, the CAN signals can be transmitted as you want. If you want to refresh signals, then just use XNET Write.vi again.
09-24-2019 01:50 AM - edited 09-24-2019 01:52 AM
I tried your solution but I see at the reading node, I read 2 data of frame. one with the original frame and one with the new signal value. I think the reason because I create 2 different sessions. How do you create session with your suggestion, one for frame, one for signal?
09-24-2019 01:55 AM
You can transmit your original frame under a while loop, and transmit your signals as I said. It‘s OK to run two XNET write.vi in different modes at the same time.
09-24-2019 02:03 AM
My data is the Cyclic data, I just create Frame Out Single-point and start session. In while loop I did not write for original frame. I add an event structure inside while loop to write the data for signal. But when I read that frame at the receiving node, I see two data of frame. One is original frame, one is the new frame with signal data. It repeats continuously.
09-24-2019 02:05 AM
Now I want to see your VI.
09-24-2019 03:00 AM
Please check it
09-24-2019 03:22 AM
Adding XNET write.vi into your "signal data: value Change" event can solve your problem.
09-24-2019 03:27 AM
Sorry I don't understand your idea. Can you help me to make it and upload the snippet here? Thank you so much
09-24-2019 03:47 AM
See the picture, and then you can understand.