Example Code

NI-USB 6009, HS35F-62 12 bits Gary code, reader programming Speed compare-LabVIEW

Code and Documents

Attachment

LabVIEW 2015 programming speed compare.

Using NI-USB-6009 tow digital port to read Gary code from HS35F-62 encode sensor, transfer to anger.

There are three programming for same function, but speed will be defferent.

First one innital line in loop, the 1000 times take 49336 ms, that is one acquisition take 49 ms.

Second one initial out of loop, run 1000 times, take 13777 ms. that is one acquisition take 13 ms.

Third one use port read and for loop to transfer data, run 1000 times take 2218 ms, that is one acquisition takes 2 ms.

See attached vi.


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors