LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Speed of execution (digital out) on Arduino Uno

I'm working on a simple VI to test human visual "refresh-rate."  The vi uses LINX and an arduino uno to flash an LED at a user supplied rate.  I've heard that the threshold for smooth flashing (ie, the frequency speed limit for vision) is near 75HZ, or 12ms.  I've written the attached vi to test this, but I still see discrete flashing at 1ms, so something in the code seems like its holding up the execution.

Any suggestions would be appreciated.  I assume there's a way to probe execution with a timing diagram?

Nathan

0 Kudos
Message 1 of 10
(5,565 Views)

Hello Nathan, can you send use an older version (LabVIEW 2013 ...) ?

Or the image ?

Thank you.

0 Kudos
Message 2 of 10
(4,186 Views)

Here's a '13 version

0 Kudos
Message 3 of 10
(4,186 Views)

Hello Nathan,

Could you see if you have the same problem with this vi ?

JPV67
0 Kudos
Message 4 of 10
(4,186 Views)

Hello Nathan, I'll try it tomorrow. But can you measure the signal on the led with an oscilloscope ?

JPV67
0 Kudos
Message 5 of 10
(4,186 Views)

Hello Nathan, I'll try it tomorrow. But can you measure the signal on the led with an oscilloscope ?

JPV67
0 Kudos
Message 6 of 10
(4,186 Views)

Hello Nathan, I'll try it tomorrow. But can you measure the signal on the led with an oscilloscope ?

JPV67
0 Kudos
Message 7 of 10
(4,186 Views)

For questions about LINX, please post in the LINX forums.

Also, take a look at the FAQ about exection speed.  You can't get any faster than the listed time there (but you are also not guaranteed that it will be even that fast).  You can create your own loop rate calculation in your loop.  See the attached image.  HINT:  Save the image to your computer and then drag it onto your block diagram.

0 Kudos
Message 8 of 10
(4,186 Views)

Hello Nathan nmoorewsu,

I have the trace of the scope from up to down 10mms, 5ms, 2ms, 1ms.

As you can see, the trace is quite OK for 10ms, then it is not good. it is because you have to not forget that with LabVIEW and Windows you always have sofware which are trunning as they want (looking for the keyboard, the screen, ...

If you want precise timing you have to use hardware or FPGA or Arduino alone, but not Windows and LabVIEW or just to oversee and control the timing (with short time). Hope tis can help

Message 9 of 10
(4,186 Views)

Thanks for posting this o-scope readout!  I saw the same thing w/ my corei5 interfacing with an Arduino Uno.  Regular output from a for-loop including a wait was fine until about 10ms.  the oscilloscope outpue below was for a wait time of 1ms.  Software-timing is apparently not reliable for less than ~10ms.

Labview Document.jpgCapture.PNG

0 Kudos
Message 10 of 10
(4,186 Views)