LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

execution order

my system looks like the picture attached. Ideally, when user writes an input (User Input), there should be an output at the output terminal (DAQ Assistant 4). Then the Feedback (DAQ Assistant3) is able to read in data and trigger the function in the Mathscript module. The output of Mathscript module is then combined with User Input before written to the output terminal (DAQ Assistant 4).

 

When I run this code, the problem is that if there is not input to the Feedback DAQ, there is no value at the output terminal. What modifications are expected to make in order to solve this problem?

 

Thank you for your help.

0 Kudos
Message 1 of 19
(3,348 Views)

I don't understand your question.

 

What input are you expecting to have go into the "Feedback DAQ"?  It is reading an analog input channel, so it is going to output the data to go to the math node. 

0 Kudos
Message 2 of 19
(3,344 Views)

the user input is rotating speed and the feedback is rotating speed calculated from the output of an encoder. the output is voltage which is to control the inverter. Thank you.

0 Kudos
Message 3 of 19
(3,335 Views)

Okay.  You have a user input of rotating speed.  And you have your DAQ assistant "feedback" of the speed from the encoder.  You do math on those values and send the results out to the analog output through a DAQ assistant.

 

So where is your problem?

0 Kudos
Message 4 of 19
(3,328 Views)

the problem is when i run the code. if there is no input to Feedback DAQ, the system wont run. but ideally it should be able to write an value to the output, and there there will ben a feedback.

0 Kudos
Message 5 of 19
(3,325 Views)

" there should be an output at the output terminal (DAQ Assistant 4). Then the Feedback (DAQ Assistant3) is able to read in data and trigger the function in the Mathscript module. The output of Mathscript module is then combined with User Input before written to the output terminal (DAQ Assistant 4)."

 

 

 

If you want to feedback from 4 to 3, you have to use a shift register or a feedback node.  This is because the dataflow of your VI is from 3  to 4.

 

 

FYI

In your second statement I think you mean you are writing to the input terminal of 4, yes?

-------
Mark Ramsdale
-------
0 Kudos
Message 6 of 19
(3,324 Views)

@Wei_W wrote:

the problem is when i run the code. if there is no input to Feedback DAQ, the system wont run. but ideally it should be able to write an value to the output, and there there will ben a feedback.


What do you mean that there is no input to the Feedback DAQ?  That is going to be one of the first things to run in your VI and you will have a value based on the current speed detected by the encoder coming out of that DAQ assistant.

0 Kudos
Message 7 of 19
(3,319 Views)

I mean that to run the test rig which is connected to this LV code, I need to write a value to the DAQ4 so that the motor can run at the given speed. only when it runs, the encoder will generate impulses. DAQ3 then can count it as the feedback.

0 Kudos
Message 8 of 19
(3,313 Views)

YES. Could you let me know how to perform your suggestion? thank you.

0 Kudos
Message 9 of 19
(3,312 Views)

A shift register in the loop will give you feedback.  Can you start 3 with a "guess" value from 4?  

 

Can you run one 4 outside the loop and pass it's value into the shift register that feeds 3 ( when you add the shift register that is)?

-------
Mark Ramsdale
-------
0 Kudos
Message 10 of 19
(3,306 Views)