Setting Data Rate IF Kit labview

Technical Discussions on any InterfaceKits
zjoris
Fresh meat
Posts: 2
Joined: Mon Apr 01, 2013 2:15 pm
Contact:

Setting Data Rate IF Kit labview

Postby zjoris » Mon Apr 01, 2013 2:27 pm

Hi all,

I'm using NI Labview 2012 and an IR reflectance sensor (https://www.sparkfun.com/products/9453) to measure the RPM from an engine. It should be able to measure engine speeds of around 3600 RPM or 60 Hz. The standard data rate of 8 ms (125 Hz) of the I/O board is therefore barely enough. The measurement gives very strange results therefore. It seems to introduce a low frequency disturbance.
I've tried setting the data rate to 1, 2 or 4 ms, but this doesn't seem to change the results. Now I've read that setting the data rate below 8 ms will not change the transmission rate so the I/O board should send a package containing multiple measurement values every 8 ms. I don't know however how to cope with this in Labview. As far as I can tell, the GetSensorValue VI only outputs 1 integer and not a package containing up to 8 measurement values.
Also, changing the data rate to 1000 seems to have no effect.
Does anybody have any idea where the problem might be?

User avatar
Patrick
Lead Developer
Posts: 3091
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Setting Data Rate IF Kit labview

Postby Patrick » Mon Apr 01, 2013 2:55 pm

In labview, you will need to use events - the <8ms data will not be updated to the getSensorValue property. Have a look at the example .vi for interfacekit with events.

You will also need to change the event loop timer to a low value - ie. 1ms to catch all of the events.

-Patrick

zjoris
Fresh meat
Posts: 2
Joined: Mon Apr 01, 2013 2:15 pm
Contact:

Re: Setting Data Rate IF Kit labview

Postby zjoris » Wed Apr 03, 2013 12:01 pm

Thank you very much for the quick response Patrick.
Using events I can still not get it to work however. If the USB controller from the I/O board can indeed only communicate every 8 ms as mentioned in the documentation, then the output of the IFEventExe VI should be an array containing multiple (8 for 1 ms datarate) values right? The output port however is just a single integer as far as I can see.
I ust used the IF Event Example VI and added the SetDataRate VI before the while loop. Also removed the wait timer to have it running as fast as possible. This still doesn't seem to record data at the higher sample rate.

Greetings Joris

User avatar
Patrick
Lead Developer
Posts: 3091
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Setting Data Rate IF Kit labview

Postby Patrick » Fri Apr 05, 2013 9:36 am

You won't get an array of data.. you will get multiple events every 8 ms. Come to think of it, this may be where the problem lies. Labview is not very good at dealing with events - as it's really just polling for them, so I think that events could be missed in the case of the interfacekit.

-Patrick


Return to “InterfaceKits”

Who is online

Users browsing this forum: No registered users and 1 guest