I have the following situation:
In my application I already defined the CAN Frames. I use different CAN controllers to send/receive CAN messages, and now is the time for NI Card 8512.
Until now I send single Frames using CVI timers to simulate cyclic messages , because the CAN controller does not support sending cyclic messages by them self (as NI 8512 does). So I want to use this feature. I created a database in memory, defined my cyclic messages and started a session.
My problem is that when starting the session, the whole cyclic Frames start to send the payload data, and have no possibility to control (start/stop) each Frame. I want to control programatically the cyclic messages. I found the possibility to change the cycletime by changing nxPropSessionSub_CANTxTime for that Frame, but could not stop it, without stopping the session. I wanted to start one session for all messages and start/stop some messages as cyclic frames and the others in event-driven manner.
The only possibility for doing that now (after my opinion) is to start for each cyclic frame a session, and for other frames (event driven) only one session. But for that all cyclic messages should be defined in database (static) or in :memory:
Thank you in advance,
I wanted to start one session for all messages and start/stop some messages as cyclic frames and the others in event-driven manner.
That is not how sessions work. All frames in a session start and stop together. If you want to start and stop some of your frames separately, put them into a separate session.
The only "workaroud" that I can think of would be to use the properties nxPropSessionSub_CANStartTimeOff, which schedules how long after a start the frame will delay before sending out the first frame (used for cyclic objects) and nxPropSessionSub_CANTxTime, which sets the cyclic rate for an object. If you want to "pause" an object, you can set the StartTimeOff for a very long time and then set the CANTxTime for a very long time, which effectively pauses the object. To set it back, you can then set StartTimeOff to 0 and CANTxTime to the desired time to make it restart the object.
thank you for the answer. This is a possibility, and I will try to implement it.
Do you know what is the maximum for nxPropSessionSub_CANTxTime and nxPropSessionSub_CANStartTimeOff ?