LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Skripting in LabVIEW

HI forum,

 

i am working on a new project, where i will control multiple NI Modules (Serial AC Power Supply, AI,AO and CAN) with LabVIEW, Right now I am working on Drivers to control my instruments.

To start in the right direction I wanted to ask in the forum what is the best way of scripting in LabVIEW. I used Matlab for scripting for example running through all voltages from 100V to 230V in 1V steps, then run through all Frequencies 50-60Hz. I know there is sequence structure in LabVIEW but then i will have for example 100steps this will be confusing.


Thanks and best,


Martin

0 Kudos
Message 1 of 11
(3,559 Views)

Scripting in LabVIEW is something else.

 

You seem to simply want to scan through a list of voltages and frequencies. Since you know the number of iterations at the start of the test, you would use FOR loops.

Message 2 of 11
(3,545 Views)

Hi Altenbach,

 

thanks a lot for your reply, yes for loops makes sens, but if i have multible tests Frequency, Voltage, current, Faults, different phases (three, one phase),... and test each each combination. Would it make sense to use Teststand to sequence this tests or make one big vi.
Thanks
Martin 

0 Kudos
Message 3 of 11
(3,539 Views)

Do you have teststand?

0 Kudos
Message 4 of 11
(3,532 Views)

yes i could get it if needed

0 Kudos
Message 5 of 11
(3,530 Views)

@Martin88 wrote:

Hi Altenbach,

 

thanks a lot for your reply, yes for loops makes sens, but if i have multible tests Frequency, Voltage, current, Faults, different phases (three, one phase),... and test each each combination. Would it make sense to use Teststand to sequence this tests or make one big vi.
Thanks
Martin 


It depends on how advanced it is and your requirements.

I'd use one loop fed with all those parameters and read those parameters from a text file for easy change/expansion without needing to change any code.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 11
(3,473 Views)

If you are going through a sequence of tests, TestStand is often the way to go.  But how much are you doing in each of those tests?  If it is just take a reading and compare it to limits, then just make a quick state machine in LabVIEW.  If there is a lot of instrument settings, measurement taking, etc for each test, go with TestStand.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 11
(3,457 Views)

Hi all,

 

yes there are many ways to do it a state machine would be also possible also reading the a configuration file another, but i want to have it as flexible as possible, as may more tests and instruments coming up. For right now i will have one power supply, CAN communicated relays but i would like to have current sensing and voltage sensing with a multi daq card. 

So i was thinking build one vi for each of the test with variation of voltage, next current, next frequency, then for each phase, then may also fault injection test,... . Each vi could have a state machine with three states "initialization of the Instruments", "run variation test" and "summary/report". Then it would be really easy to sequence these tests with TestStand i want to avoid to have on big vi that will difficult to expand and read later.

 

 

Thanks in advance,

Martin

0 Kudos
Message 8 of 11
(3,422 Views)

I would recommend the one state machine for all tests.  You could read a text file that tells you which tests to run, put each of those states into a queue, and then dequeue your states.  Do a search for Queued State Machine and you'll see what I mean.  This will make it possible for people to load up any sequence of tests they may want.  Adding another test is just another state to make.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 11
(3,417 Views)

HI crossruitz

 

thanks for your fast responde you mean something like this:

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

i will look at this example and then try to implment a simple test and let you know.

Best 
Martin

0 Kudos
Message 10 of 11
(3,406 Views)