LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW simple pendulum simulation

Hi JT,

 

LV22Q3 isn't used so often as it may seem.

Could you please attach a downconverted version of your VI (File->Save for previous)?

(I prefer LV2019.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 41 of 54
(1,767 Views)

Yes sure please try this file im attaching 

Also these were the formulas i had to work with 

Screenshot 2022-12-08 112759.png

0 Kudos
Message 42 of 54
(1,763 Views)

Hi JT,

 

are you sure your formulas are correctly translated to LabVIEW?

Did you try to debug your VI using probes/highlighting?

 

Cleaning up the block diagram also helps to understand the code:

Why did you use the log2(x) function when your formula says to use the exp(x) function?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 43 of 54
(1,755 Views)

Im very new at this stuff but thank you so much for your help. When it comes to damping is my method correct ?

0 Kudos
Message 44 of 54
(1,748 Views)

Hi JT,

 


@JT1122 wrote:

When it comes to damping is my method correct ?


when translating formulas into LabVIEW code it always help for clarity/documentation to use indicators with labels the same as your formula variables.

 

There is no "x" indicator in your VI, and there is no "t" indicator. (Instead there was an unlabeled control, which is a No-Go!)

And as already mentioned there was no exp(x) function in your VI: does that answer your question?

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 45 of 54
(1,744 Views)

Kind of yes i have to label the equations, I just seem to be getting the pendulum to not swing how it normally does, as well as when it comes to applying damping, it doesnt seem to work, If possible could you look at the simulation on the VI and give me some sort of idea on how to fix it ? 

0 Kudos
Message 46 of 54
(1,748 Views)

Hi JT,

 


@JT1122 wrote:

give me some sort of idea on how to fix it ? 


I already told you to debug your VI using probes and highlighting?

Did you?

 

Then you can easily spot the problematic parts in your code…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 47 of 54
(1,728 Views)

I wrote the code out that you cleaned up, and the pendulum isnt oscillating 

0 Kudos
Message 48 of 54
(1,674 Views)

Im very new to this so i dont know how to do the debug thing 

 

0 Kudos
Message 49 of 54
(1,672 Views)

I am attaching what I think is correct please do let me know what mistakes i have made if you are able to view it 

0 Kudos
Message 50 of 54
(1,657 Views)