02-25-2013 09:38 AM
Hi guys,
I'm fairly new to labview, but given how good the Compact DAQ cards are I decided to run with it and use labview to control an electromechanical relay accelerated aging project that I'm working on. I have the relay being driven by an NI 9475 DAQ expansion card, and that all works fine. I'm also able to adequately capture the data back from the NI9221 card which is measuring voltage drop across the relay contacts.
The problem I'm currently having is that I want to count the number of actuations that the relay has undergone in order to identify the point at which it eventually fails. Since the voltage output of the relay will vary as a square wave I was hoping I could use some sort of edge detection which would increment a counter whenever the relay actuated and the voltage across the contacts drops to zero. So once the relay fails and stops actuating the counter will stay constant and tell me how many times the relay actuated before it broke.
The problem is that I'm not completely sure how to do this in LabView. I had a stab at it in the attached VI but while the chart happily shows the relay actuating (I'm doing the actuation manually in this case) however, I'm not having any success detecting the edges and incrementing the counter. Does anyone know I might be able to make this work?
Cheers,
RB
02-25-2013 01:08 PM
RB,
I can't look at your code becuase I'm still running LV2010SP1. Looking for edges can be a problem.
In your case I would not bother looking for edges, I would look for levels. I would close the relay, wait about 100mS to give every thing time to settle and then measure the voltage across the contacts and verify that it is within an acceptable range. I would do the same when relay opens.
AC or DC coil on the relay under test? What kind of load is connected to relay under test?
02-25-2013 03:34 PM
Given your current hardware I'd agree with Wayne's suggestion. If you're open to alternative modules:
C Series digital input modules with 8 lines or less can route their inputs to the cDAQ backplane counters.
The 9205 can also do this (you could configure an analog trigger with user-defined threshold and hysteresis) but the input range is only up to ±10 V (and the Digital line on the 9205 is 5V TTL only).
Best Regards,
02-25-2013 06:41 PM
03-02-2020 02:36 PM
I'm trying to achieve the exact same thing on cDAQ 9178 and NI 9403. I'm unable to view the .VI file that you have uploaded. I'm really new to Lab View and want to use a counter to know how many times the relay is actuated. I used an updown couter and was able to do this on Zelio PLC. I'm trying to implement it on Lab View now. Any help is appreciated.