LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Code for testing Electromagnetic Relays

Hi, I’m very new to Labview (started this morning) and was wondering if anybody can help me. My problem is as follows:  I’m trying to measure electromagnetic relay (not the relay on the NI module) contact resistance by applying a pulse to an output via DAQAssistant so it closes the relay and allows an external current to pass through.  At the same time the relay is closed I would like to make measurements via another DAQAssistant such as resistance, voltage etc.  As well as this I would like to display the measurement via number of operations (the idea is to keep testing until the relay contacts fail).  It would also be useful to be able to vary the time the relay is closed and the duty cycle.I have tried some code,see attached, but it doesn't work very well. 

Thanks Andy

P.S. the Labview version is 10 and the DAQ is a NI cDAQ-9172, with NI9219 and NI9481 modules.

0 Kudos
Message 1 of 5
(2,549 Views)

There are many people who will refuse to open a propriatary file such as you attached. If you want to attach code, attach the VI or at the very least, a LabVIEW snippet (look it up in the help).

0 Kudos
Message 2 of 5
(2,545 Views)

Thanks for the advice.  Yes I don't think I would be keen to open any old file.

 


I've attached code insted.

0 Kudos
Message 3 of 5
(2,537 Views)

You have two completely independent while loops with no synchronization between them. Therefore, you have no idea when the relay is closed and when to take the measurement. There are some synchronization examples or for something crude and basic, with dataflow (i.e. error in/out connections), you can simply energize the relay and then take a single analog in measurement.

0 Kudos
Message 4 of 5
(2,528 Views)

Thanks for your reply, I'll try synchronizing them.

0 Kudos
Message 5 of 5
(2,512 Views)