03-19-2015 09:55 AM
Hello,
I have a CAN Frame output single point session, where I start sending some frames with the default signal values. Now I want to change only one signal, and keep sending the new value. Do I have to modify the entire frame, and write it to the existing session, or is there any way just to select the signal from the database, and send it?
Madottati
03-19-2015 10:15 AM
As a Frame Out session you cannot do this, as a Signal Out Session you can. You pick the signal to update and give it a new value and all the signals that were not changed keep sending what they always were.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-19-2015 10:17 AM
does it mean, that I should use Signal Output instead of Frame Output session?
03-19-2015 12:03 PM
I don't know your application or needs, only you can determine what you should be using. All I'm saying is you won't be able to do as you asked, in the way you asked it. If you are updating signals in a frame, then you should be updating the signals, not the frames.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-10-2015 07:12 AM
Hoovahh,
Is there a vi in the XNET API that allows changing only one signal?
That's exactly the function I'm looking for today and I didn't find it built in so I've been writing code that stores the values of all of the signals in the session.
04-10-2015 07:27 AM
Yes it is the Write VI. Just make another session with only that one signal in it and update its value. I can't test it at the moment but I think you can have multiple sessions open of the same type at the same time.
Of course a better solution is to use the same write, and just update the one value in the array. This requires you to keep track of the previously written values, a functional global is an easy way to do this.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-10-2015 08:27 AM
Using individual sessions for each signal didn't work - probably because the signals are in the same frame. The XNET Write vi didn't update the data on the bus unless the given session was the only one that was active.
I'm going to try using on session for all signals and creating another single signal session on the fly right now, but my expectation is the same behavior.
04-10-2015 08:32 AM
Thanks for the suggestions, by the way. Worst case scenario I need to keep track of the data myself - I'm just looking for something a little less cumbersome.
04-10-2015 09:45 AM
The behavior was the same when there was one session containing all of the signals and one for the updated signal that was created on the fly.
I'll be using TestStand to set the signals, and I'm trying to keep things as simple as possible. Simplicity is one reason why it's better if I don't have to maintain a record of the all of the signal values.
04-13-2015 02:15 AM
Hi Jaime,
I also made some experiments, but the final solution is to run a Signal Output Single Point session. The user can configure, which frames he wants to send, at run time I create an array of all the signals of the selected frames. Basically two arrays, one for the signal names, and another with the values. So it is quite easy to track changes of the values.
Another challenge for me is to "disturb" a signal value: Change the signal value, send the changed value N times to the bus, then return to the original value. Do you have any good solution for that?