‎08-03-2013 06:21 AM
I am getting started on using the arduino with labview. i have installed the required packages. I have been able to find example vi's and videos on digital write.
Facing problems when it comes to monitoring the state of an led.
Is there an example VI which can monitor the state of an led on my bread board. also what would be the final sampling rate if it is plotted on a graph on the front panel
‎08-03-2013 11:46 AM
What do you mean by "monitoring the state of an LED"? You can't really monitor the state of the LED itself, but you can monitor the state of the of the circuit being used (0 or 5V).
The sampling rate when sampling from LabVIEW is dependent on the communication with the Arduino. What kind of sampling rate do you need? Does it need to be consistent? Basically, could you provide more information about what you are trying to do?
‎08-04-2013 03:37 AM
i am working on a vi which can simulate the keyboard and the mouse for the paralyzed with a single button (or a blink sensor)
i have the code ready, and it does the job via a push button,
i am now working on interfacing the arduino with lab view
i could find examples and the required sampling rate is much lower than what can be achieved with the arduino.
i have a few other questions.
is there a better way to do the following?
i have attached the pic of the block diagram which monitors an analog pin 10 times in each pass of the loop
the rms value of these 10 samples, if greater than 0 gives a Boolean high , if equal to 0 gives a low.
this is a global variable and i have another vi running which calls many other vi's for using the virtual mouse, virtual keyboard, etc...
its working for me, but i would like to optimize my code.
also , i am continuously checking the global variable (with a case structure in an infinite loop) "knowing the in-efficiency", as global variable value change cannot be tracked in an event structure.
how can i optimize that ?
also, how do i track the state of the the mouse cursor in labview?
ps: really sorry for the late response, i have been very busy as i have a deadline to complete these stuff .....
‎08-04-2013 03:48 AM
The picture is missing.
If you have everything working with LIFA then then you will probably get a better suited audience in the general NI Forums regarding your LabVIEW (i.e. not related to LIFA specifically) issues/optimizations.
If you would like to optimize the LIFA code, I can take a look at your code and you would need to explain exactly what you need out of the code parts that deal with LIFA.
EDIT: I just remembered a way that you might be able to use an event structure with your boolean. In your loop, you can compare the new value from Arduino to the old value. You can then set the global variable as normal and then set a local indicator using a property node using using "Value (signaling)". Then, your event structure can look for the change of the local indicator. Not sure if this is the best method but I think it will work.