From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-30-2010 05:58 AM
Hi
I'am reading from a serial device with VISA.
I am reading the data OK but I like to know how can I measure the sample rate (Hz) ?
The data is displayed on a Waveform Chart.
Thanks
Solved! Go to Solution.
04-30-2010 06:06 AM
04-30-2010 06:07 AM
hi,
Place a while loop and place wait until next ms multiple vi and wire to some 1000.Inside the while write the program for acquisition through the serial port.Now after some time..stop the while loop and check the value of i(no of seconds)...and check the array size of the values...and like that you can calculate the sampling rate...Remember it is a software timing(maynot be correct).
Thanks and regards,
srikrishnaNF
04-30-2010 08:16 AM
Hi
I managed to get the sample rate and is somehow lower than I expected.
With another program I get around 50Hz and with Labview ~33Hz.
Can I finetune VISA to get a higher sample rate ?
Thank you
04-30-2010 08:30 AM - edited 04-30-2010 08:36 AM
The RS232 isn't that fast, so you should be able to fetch all values. Nice task for a consumer producer architekture.
If you post your reading code it would be easier to help.
Read the manual of your device, sometime they offer a mode to send continously values at a defined (max) frequency.... BTW what device? Maybe there is already a ready made driver for it.
/cristall ball mode
init the visa port once at beginning and close it once at the end will speed up things a lot....
/cristall ball mode off
04-30-2010 09:02 AM
I used the advanced serial example from Labview, I attached the parameters. The device is supporting a baud rate of 115200, I tried with 9600 and the same ~33Hz.
The data I read is OK, is terminating with C1.
The device is sending with a sample rate of 50Hz, with another program (EyesWeb http://musart.dist.unige.it/EywMain.html) the sample rate it's OK.
04-30-2010 09:19 AM
04-30-2010 09:43 AM