LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment decrement

Hello everyone,

I come to you because I now realize the control of a sinusoidal excitation shaker . The principle is simple, generating a sinusoidal setpoint variable frequency ( min - > max frequency ) .
Currently my system performs well incrementing my frequency , however I would like when I get my maximum frequency that is decremented to my minimum frequency and so on!

example :

50 Hz - > 100 Hz - > 50 Hz - > 100 Hz - > ...

I leave attached 2 faces of my supervision including the following principle :

On the first front , we enter the values of frequency and amplitude to reach. The following graph fits the points he was assigned .
On the second side on our graph is postponed, and regulation following the previous desired profile is achieved.

Until now I have tried to reverse the table of my data to see if the graph would fit correctly and realize my increment and decrement ... The frequency decrements well yet my amplitudes are false.

cordially

Download All
0 Kudos
Message 1 of 10
(2,669 Views)

Hi Geoff,

 

sounds like you want to program a small state machine: "increment value til max" and "decrement value til min"…

Best regards,
GerdW


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

I tried to change the block sweep this way. Frequency amplitude decrements correctly but my poor! What should I do?

0 Kudos
Message 3 of 10
(2,659 Views)

the amplitude of the frequency decrements correctly but the amplitude does not correspond at all to the opposite of what I want ...Sorrry for my bad english 😃

0 Kudos
Message 4 of 10
(2,655 Views)

did you understand my problem ? 

0 Kudos
Message 5 of 10
(2,646 Views)

Hi Geoff,

 

I do understand your problem, but I don't understand your VI.

 

Why do you use so much local variables? Why do you use them in such an insane way?

check.pngWhy do you need to multiply a local variable by itself? Why do you need local variables fur such tasks?

 

Clean up your VI. Define app states and introduce a proper state machine architecture!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(2,635 Views)

Hi

 

I use local variables to réalsier calculations. Indeed from the acceleration, I can get the movement and speed. Instead of realizing integration and double integration calculations I carries this way. This sets the limits, in my case the limits of shaker. However, this is not what block I have a problem 😃

0 Kudos
Message 7 of 10
(2,631 Views)

Hi,

 

As GerdW told you, you need to define your app states and introduce a proper state machine architecture!

We are not talking about calculations you are doing but about your architecture.

Try to think about an FGV which increment or decrement your value. Could be helpful !

 

BR,
Vincent

0 Kudos
Message 8 of 10
(2,605 Views)

Hello,

 

thank you for your answers. I'm sorry labview amateur. Do you have one or two concrete examples so I understand a little better now that you ask me to try? What are the advantages of using FGV?

Geoff

0 Kudos
Message 9 of 10
(2,578 Views)

Hello Geoff,

 

You first have to say which architecure you need.

To just decrement or increment a simple value, a shift register could be enough. But in larger app's, FGV could be used as well.

 

Here is a community example showing the basic implementation of a FGV

https://decibel.ni.com/content/docs/DOC-2143

 

BR,

Vincent

 

0 Kudos
Message 10 of 10
(2,547 Views)