03-26-2009 01:45 PM
04-07-2009 01:22 PM
Hello Kpraveen,
You could set the period for N*Period, N being the number of modes. You just need to make sure your application changes the modes fast enough to update each periodic frame.
For example, say you have 2 modes and the frame's period should be 10ms. That means that you would like that frame to go out twice every 10ms, updating mode 1 and then mode 2. So, that means that the frames period can be 5ms.
1. It will start by updating mode1
2. 5ms later, it will update mode2
3. 5ms later it will update mode1 again
...
mode 1 really has a period of 10ms...
You just have to make sure that you can update the frame fast enough, or switch between modes fast enough, or you will send the same mode twice.
Let me know if this helps, or if I an not understanding this properly. Have a great day.
04-08-2009 12:41 PM
Prolux,
The solution provided by you makes me to move out of using the Onboard clock of CAN module. This makes the processor to take more memory. What i am able to achieve is, i am able to send the periodic messages by configureing them once and based on the onobard clock the next time onwards they are sent automatically, which makes my job much more easier and as it uses onboard clock, the processor memory taken for running is low and even with the timing issuesit almost perfect. By changing the code according to your solution, there will be timing issues.
Now in my application what happens is as we can create only one objectID, though i send the data two different times at the start itself, only the last sent data is present which is being sent out periodically.
So what i wanted was while making the objectID for a perticular message ID which has modes, can we not create same number of copies of objectID's as number of modes and send them periodically by using onboard clock.
04-08-2009 02:15 PM
Hello Kpraveen,
I meant to configure your objects the same way, using the hardware (onboard clock) for the period. However, you can double the period and modify your data in your program. If your program is running faster than your period, you should have no problem updating the value before the hardware sends it out.
The frame API is a low level API. It does not know anything about modes...All it gives you are all the raw frames, so you have to manipulate the frames to do what you want.
What kind of hardware do you have? If you have PCI/PXI hardware, you could look into using the channel API, which supports mode dependant messages and different rates.
Have a great day.
04-12-2009 08:11 AM
We use PXI chassis.
I am still not able to observe two different data present on the CAN bus for the same message ID.
Could you please if possible send the code which makes to send the different data for the same message ID to send periodically by configuring it only one and using onboard clock, so that i can compare with my code and check out what exactly i am missing out.
Thanks.
Praveen.