LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous implementation of formula node

for some reason this attached file does not run continuously, although it does not mention any errors. Also the counter "c" or any other O/Ps don't do anything.The DC signal source would be replaced by a EMG signal during realtime application
0 Kudos
Message 1 of 5
(2,785 Views)
The formula node never finishes, thus it will never produce any output. It's all in the dataflow.
 
What exactly are you trying to do?
Message 2 of 5
(2,781 Views)
with input as EMG signal, I want to design a system that will help me detect changes in voltage levels of a muscle and corresponding muscular functions. so the 1st time i contract my muscle ,the EMG voltage increases and it should give a 1 at "e" and -1 at"f". 2nd time the voltage goes up it should give out 1 at "f" and -1 at "e". when the voltage level drops after the secong high, the counter that counts these high levels, "c"should reset to zero. At  all other times when to voltage level is low it should give out 1 at "m". Instead of the actual muscluar signal I am using a simulated DC signal.
0 Kudos
Message 3 of 5
(2,779 Views)

Actually the outputs should be

1st high level: c=1, e=1, f=0, m=0

2nd high level: c=2, e=0, f=1, m=0

3rd high level: c=1, e=1, f=0, m=0

all low levels: c=0, m=1, e=0, f=0

0= boolean low, 1= boolean high.

0 Kudos
Message 4 of 5
(2,774 Views)

Hi Kronus,

As altenbach points out, since your forumla node never completes, it never passes out any data.  The forumla node is like a subVI.  It executes one time once it receives all of its inputs.  Once it has completely finished executing the code it holds, it passes out the final outputs.  The way your code is currently structured, your output variables will be written to only one time.

Perhaps a better architecture would be to do your data acquisition in a loop and monitor the signal with a case statement there.  You can use a value to count the number of "high levels" and use the case structure to set the outputs to the appropriate values for the current number of "high levels".  It looks like the dataflow paradigm may be tripping you up.  If you're new to LabVIEW, check out these links:

Three Hour Introduction to LabVIEW
Six Hour Introduction to LabVIEW

Hope this helps!
Megan B.
National Instruments

Message 5 of 5
(2,741 Views)