LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building simple circuit in LabVIEW

Hello 

I am trying to build a model as shown in the reference image. But I cannot see any output in my waveform chart. When I did analysis by adding piece by piece, I found the outputs disappear when in two cases

1. When I give output of "Integrator_2" to "Multiplier_1"

2. When I give output of "Integrator_3" to "Multiplier_2" or "Divide_1".

Note: Please change the "Loop time" to "1", and input to "377"  before running the vi. I simulated the circuit in Sim-power and it is working fine, where I used "Integrator_1" initial value as "1" and "Integrator_2" initial value as "100*pi". 

When I remove the above mentioned three connections and replace them by some constants I can see the output, But even if I connect one connection, output is disappearing.   

Can any one please let me know why is this happening in LabVIEW.

 

Thank you in advance

Ram 

Using LabVIEW 2014

Download All
0 Kudos
Message 1 of 5
(3,440 Views)

Hi Ram,

 

in LabVIEW you don't create "circuits" or "models", you create VIs (and their block diagram)…

 

I found the outputs disappear when in two cases

What do you mean by "disappear"? Does the indicator vanish from your front panel?

What have you tried to debug your VI?

 

Can any one please let me know why is this happening in LabVIEW.

Unfiortunately you forgot to attach that "integrator" subVI, so we cannot execute your VI.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,417 Views)

Hi GerdW

Sorry for missing the subVI. 

What do you mean by "disappear"? Does the indicator vanish from your front panel?

I mean the all waveform chart shows the output until I make one of the connections mentioned in my question. Once I connect any of the connection then the waveform chart doesn't show any output. 

 

What have you tried to debug your VI? 

I tried to run the VI by adding one block after the other, and found the there is problem with the three connections mentioned, if I remove those three connections and use constants then the waveform charts are showing outputs based on given constant values. 

 

Unfortunately you forgot to attach that "integrator" subVI, so we cannot execute your VI.

Sorry about that, I am attaching all the files including the subVI .

 

Thank you

Ram

Using LabVIEW 2014

Download All
0 Kudos
Message 3 of 5
(3,386 Views)

Hi Ram,

 

Sorry about that, I am attaching all the files including the subVI .

You attached "Integrator3", but your main VI searches for "Integrator2". I guess both are the same!?

 

I changed that subVI a little bit, but I'm unsure about its correctness. Anyway you don't need a formula node here - and I have a bad feeling about a formula node with an input and output of the very same label…

 

I tried to run the VI by adding one block after the other, and found the there is problem with the three connections mentioned,

Wrong.

Debug your code with execution highlighting and probes: you will notice several NaN values due to division by zero…

 

I mean the all waveform chart shows the output until I make one of the connections mentioned in my question. Once I connect any of the connection then the waveform chart doesn't show any output. 

You just found a very nice and useful feature of charts and graphs: when you wire NaN values to them the plots/points become invisible!

That's not a problem of the charts, it's a problem of your calculations!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,379 Views)

You get NAN because you don't initialize your feedback nodes, resulting in a division by zero.

You also don't initialize the "integrators" (e.g. using i=0?)

0 Kudos
Message 5 of 5
(3,373 Views)