From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading voltage quickly

The thing is i need to configure the voltage at each test step so what would be good practice use a state machine? Put initialize.vi and configure current limit.vi,unconfigure.vi,close vi etc all outside the state machine and in the case structure/state machine use the configure voltage vi to have a certain voltage for one condition configure a different voltage for the next condition etc?

0 Kudos
Message 11 of 17
(461 Views)

@Damien129 wrote:

The thing is i need to configure the voltage at each test step so what would be good practice use a state machine? Put initialize.vi and configure current limit.vi,unconfigure.vi,close vi etc all outside the state machine and in the case structure/state machine use the configure voltage vi to have a certain voltage for one condition configure a different voltage for the next condition etc?


A state machine would be a great way to handle this.  There's no reason the initialize, close, etc. can't be more states in your state machine.  You might also want a wait state or something of the like.

 


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 12 of 17
(457 Views)

So for instance have a state for each vi? Also i am using other power supplies and a multimeter i could put their initialise vis in the same state?  With the visa resource name i would have these outside the while loop? Just so i understand then for my voltage configuration how would i keep changing the input voltage at each test step have a case within that state? Thanks a million

0 Kudos
Message 13 of 17
(438 Views)

I would initialize all of your equipment in the "Initialize" state and reset/close out them in the "Shutdown" state.  Whatever you do in the middle it totally up to you.

 

You can hold the current voltage in a shift register and increment it when needed.


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 14 of 17
(426 Views)

I'd still like to know why you're using a camera to read the voltage. Especially since the power supply has programming capability (which you are using), and you said you have a multimeter in your setup.

0 Kudos
Message 15 of 17
(423 Views)

Hey thanks for the reply,

 

What i have done is just initialised it outside the case loop and inside the case structure i set the voltages via a constant and increment from one voltage to the next. I am wondering is it my power supply thats the problem or my code.


However, the problems i encountered were that when i run my application obviously it takes time to initialise etc but my first test step inputs 6 volts, 2nd step is to increase from 6V to 75V which takes 8 seconds, 3rd step is to increase from 75V to 120V which takes another 8 seconds then 120 to 230 takes 18 seconds. This is far to long because i have 20 test steps my maximum time allowed for the test procedure is 40 seconds,

 

I use DC power supply for 4 steps of the test then i switch off dc supply, switch in an AC power suppy and then i do a low voltage test so i switch in the dc supply again.

 

Also i want to read from a database the voltage level for each test step how can i achieve this much appreciated!

0 Kudos
Message 16 of 17
(416 Views)

The test procedure  is:

 

a) I identify what my DUT is with a camera image i have a choice of 3 DUTs (a,b or c) i will have a template image for the 3 choices.

b) Choose the test procedure to run depending on (a,b or c)

c) Initialize my hardware

d) Read parameters from database1 and apply to power supplies (AC or DC power supply)

e) first step apply 6V, my DUT which is hardwired to power supply will display 6 on LCD and light an led,

f) using a camera inspection i have to recognise that the character 6 is in fact displayed and that the correct led is on.

g) Send pass to a database2

h) Apply 75V, DUT will display 75 and 2 leds should be on.

i) Use camera inspection again

j) send pass to the database2

j) Next step switch off DC supply switch in AC supply...........this works fine using an adam to switch relays.

 

This is the reason for the camera, my multimeter will be used in other test steps to pick up current reading etc.

 

Its a bit long winded but this is my project. A producer/consumer architecture is what i have at the moment but all i have done to date is communicate with the hardware individually now i need to synch all of it together.

 

Read from database in the producer set hardware in consumer, camera inspection in producer write to new database consumer!

 

Please have a look at my code all i have is the database read which i am not sure is correct for what i need and i have initialized my hardware.

 

Thanks a lot

 

 

 

 

 

0 Kudos
Message 17 of 17
(411 Views)