Chris_R.
2007-08-27 19:40:15 UTC
Hi Prajeesh,
The best way to change the sample rate while running your program is to close out the session and reopen it at the new rate. The driver will not allow you to change properties or reinitialize the port without stopping the communication resource first. You can start with examples in LabVIEW by going to Help>>Find Examples and then browse to the Hardware Input and Output>>CAN>>Basic folder for some examples which set the sample rate at the front of the CAN VI sequence. The sample rate input is in Samples per Second. You can also check out the NI-CAN Hardware and Software Manual which is installed with the NI-CAN drivers. You can find this from the start menu in Windows by browsing to All Programs>>National Instruments>>NI-CAN.
Here are some additional documents that may help:
<a href="http://digital.ni.com/public.nsf/allkb/32815319A4FE711986256E92003FD4F4?OpenDocument" target="_blank">How Do I Programmatically Change My Baud Rate in Channel API?</a>
<a href="http://zone.ni.com/devzone/cda/tut/p/id/4294" target="_blank">The NI-CAN Channel API</a>
<a href="http://zone.ni.com/devzone/cda/epd/p/id/782" target="_blank">CAN Periodic Transmission in LabVIEW Example Program</a>
Let me know if you have any questions! Best of luck with your program!
The best way to change the sample rate while running your program is to close out the session and reopen it at the new rate. The driver will not allow you to change properties or reinitialize the port without stopping the communication resource first. You can start with examples in LabVIEW by going to Help>>Find Examples and then browse to the Hardware Input and Output>>CAN>>Basic folder for some examples which set the sample rate at the front of the CAN VI sequence. The sample rate input is in Samples per Second. You can also check out the NI-CAN Hardware and Software Manual which is installed with the NI-CAN drivers. You can find this from the start menu in Windows by browsing to All Programs>>National Instruments>>NI-CAN.
Here are some additional documents that may help:
<a href="http://digital.ni.com/public.nsf/allkb/32815319A4FE711986256E92003FD4F4?OpenDocument" target="_blank">How Do I Programmatically Change My Baud Rate in Channel API?</a>
<a href="http://zone.ni.com/devzone/cda/tut/p/id/4294" target="_blank">The NI-CAN Channel API</a>
<a href="http://zone.ni.com/devzone/cda/epd/p/id/782" target="_blank">CAN Periodic Transmission in LabVIEW Example Program</a>
Let me know if you have any questions! Best of luck with your program!