Learn How to Write Labview Programs: Basic Help for Beginners

  • Thread starter Thread starter phrygian
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
phrygian
Messages
77
Reaction score
0
I don't have programming experience and I am trying to learn how to write labview programs.

I want to write a program that works like this:

I want to make a positively ramped signal that becomes negatively ramped once the difference between the current signal value and the initial signal value divided by the initial signal value reaches a certain value. The negatively ramped signal would become positively ramped again once it reached half the difference between the value where the signal switched directions and the initial value of the signal, and this process would repeat.

I have no idea how to do this without being able to store variables which I know you can't do in labview, can somebody help point me in the right direction?

Thanks a lot for the help
 
Physics news on Phys.org
The lines are variables, for carrying stuff through loops look up shift registers. Basically you can make a while loop that increases every loop then when it hits your valueit changes direction. I'll try to make a quick example when I get home, on my phone right now.

edit:

nevermind, seems my evaluation period has expired and all I have are my old 6i cd's and I'm not sure where they are. I'll try reinstalling later (I use labview for a LOT of stuff)

But basically just start with a signal value, like a double, that is your amplitue. Wire that to the edge of a while loop and right clcik on it and choose "add shift register". It adds an input/output for the while loop that contains the value that you put in the box.
Then just increment it each time by some amount, where the increment amount is multiplied by some IF where you have it so it does what you want, (multiples the increment amount by 1 or negative 1, etc.
 
Last edited:
The part that I am having trouble understanding is how do I save a value to be used later in the program without that value being changed every time the program loops? For instance, with the voltage changing, how can I save certain values of voltages to be used later if there will always be new values flowing to whatever position I want to save them at?