08-07-2012 03:35 PM
I have set up the database to cyclic timing, with the corresponding transmission time for each frame. I have four frames being outputted through streaming output using the NI-XNET tool after being concatenated and thrown into an array with the array builder function. Using the bus monitor, I can see that all the frames are being transmitted at the same rate, regardless of the rates being different in the database. What's going on?!
I tried using timing loops and timing frames, but I am not noticing that the problem is really being fixed.
I have 4 frames being packaged and then sent to the CAN stream output block from the NI-XNET toolbox. Three frames need to be transmitted at 500ms and the fourth frame needs to be transmitted at 100ms. I don't know how to have this done within LabVIEW.
Toying around with the examples and the timing tools, but get nothing being written to CAN or get an error saying that I cannot open the same frame/session twice, getting signals just drop out or getting times that change from 1.6 or 1.7 and suddenly, randomly go to 0.5 or 0.9 Hertz according to the bus monitor.
08-08-2012 11:36 AM
Hi estradjm,
It sounds to me like you have your database configured properly, but instead of using the frame configurations, it sounds like you are taking all the frames then transmitting them through the streaming output, is that right? Have you tried configuring multiple sessions, one for each of the frames, then using the frame output single point session? You should be able to configure each of your frames in the database editor with the timing you are looking for, then create a unique session for each frame on the same port. For an example of how to configure multiple sessions on the same port, take a look in our Example Finder under NI-XNET under Multiple Sessions.
08-08-2012 01:14 PM
What example is that? I don't see anything in the examples that addresses this particular problem.
I tried using the output single point sessions about a month ago, and was not able to get past the errors. The error for openning multiple sessions comes up every time. I cannot open the same session.
Streaming is the only way that the messages would write to can.
08-08-2012 02:03 PM
First of all, what have you tried ? show us some code!
Second: I can't ether find that exsample, but you should be able to find the "Virtual CAN Device Simulator".
This shows how to create multiple output sessions.
Last: What hardware are you using ? What version of LabVIEW and NI-CAN/XNET are you using ?
08-09-2012 11:00 AM
If i change the timing in the NI-XNET database for a frame, why don't the transmission times seen on the bus monitor change? Do I need to restart the VI, save the database and close it, restart the computer, restart LabVIEW? What do I need to do to change the timing for transmission?
I am using the Queued Frame Output, as I have it understood that the Streaming Fram Output doesn't take into consideration the transmission timing, but instead throws all the frames out to CAN as soon as it can.
08-10-2012 09:53 AM
How would you simulate a comm loss?
I thought by simply using the conditional statement and taking out the write to CAN block, I would not transmit to CAN, but monitoring the bus shows otherwise. I thought about using the stop and erase block or even the flush block, but then realize that the timed loop would not have anything for a session to write to CAN after you enable the conditional statement and the write.VI.
Attached is a subset of the larger VI I am using. All it is is a timed loop in which I am writing to CAN a user controlled CAN message from the UI (front panel), using a queued output mode write.VI after creating a session outside of the loop to write the specific CAN card and frame.
How would I be able to disrupt comms of a particular frame being sent out and then recover it for the purposes of fault injection?
08-10-2012 04:43 PM
How is the Transciever State work within the scope of the NI-XNET API? Could this be used to simulate a comm loss, using the normal and sleep or single wire wake? What block sequence would allow this to run? Is this possible with the use of the API?
08-13-2012 03:08 PM
estradjm,
From your first post, you mentioned that you were having issues with the timing. Is that resolved? For different timing, you will need to have multiple sessions open, one session for each different rate you are trying to send frames at. There is an example on using multiple sessions in the Example Finder.
You next asked about simulating a comm loss. It looks like you got that answere from this forum response. Finally, you asked about the transceiver state. There is a sessions property node that will give you the state of the transceiver. You can find more information about this from our XNET Hardware and Software Manual. The state information is on page 4-85.