01-06-2017 07:39 PM
Hello everyone
I'd like to use Labview to help me troubleshoot a piece of machinery. I am currently dealing with equipment that will throw an intermittent error light. I'd like to monitor the signal using Labview and help half split the problem to figure out if it is the signal or the card interupting the signal.
The signal is a 0 to 5V Pulse train at ~250 hz. The width of the pulse may vary along with the frequency (200-300 hz). I expect that if I lose just one pulse the light is being lit. At the time of a faulty signal I would like to create a time stamp along with a waveform I can review later.
While sampling the bad signal I should also be able to access a known good signal of the same amplitude and frequency but this known good signal is likely phase shifted.
So right now I am just in the phase of "How the heck should I even go about this"
Should I
1. Monitor the signal in analog and do some sort of frequency measurement always comparing the known good to bad?
2. Monitor using a digital channel and a counter? If the questionable channel gets off from the known good then capture a waveform.
3. Monitor in analog and subtract the known good from the questionable signal. They should always equal zero unless a pulse is missed.
Before I begin to code I need some sort of plan. Does anyone have any ideas? Are any of my ideas better than others?
Thanks
Trent
01-07-2017 12:37 AM
Hard to know without knowing your equipment (what DAQ devices and capabilities you have), your LabVIEW knowledge/experience, and more about the problem.
Some generalities that occur to me (a non-engineer) --
Bob Schor
01-08-2017 09:29 AM
Bob
Thanks for the reply. I have spent most of my time dealing with analog vibration type signals so forgive me if I am a little digital stupid.
1. What I meant when I said I have access to a known good signal is as follows: The signal I am talking about represent whether or not a diode is conducting. This particular machine has multiple diodes. The known good one would be one that is not indicating a fault and should have a good steady pulse train. The one I am concerned with has some sort of issue.
2. Can a true TTL signal change width and frequency? As this machine is loaded more the diode will indicate as being turned on longer. Along the same lines, as machine speed changes so will the frequency of the pulse train.
3. Since I am digital stupid. If it is ok for signal to change in frequency and width (statement 2) how can the digital signal sit idle and discern a frequency change from an error in the signal?
I look forward to continuing this discussion.
Thanks
Trent
01-08-2017 10:20 AM
Trent,
Some of your comments and questions make it very clear that you do not understand the signals you will be monitoring.
Let me try to summarize what I infer from your posts.
1. The signals represent the speed of the machine by their frequency.
2. It is not clear whether the pulse duty cycle varies.
3. It is not clear how the mulitple signals are related but you indicate that they all have the same frequency. This implies that all are generated by the motion of one machine. You also state that the signals may have different phases.
4. The frequency range is 200-300 Hz.
5. Missing a single pulse may indicate a fault and needs to be detected.
6. The maximum number of signals is not specified.
7. The expectation is that at least one of the signals will be "known good." Is this guaranteed? Do you have some independent means of identifying the known good channel or is it always the same one?
Now a bit of speculation:
A. The frequency varies but the duty cycle does not. In this case the pulse width variation will be exactly proportional to the frequency.
B. There is exactly one machine driving the system so that all frequencies will be identical at any given moment.
C. Missing pulse detection is the primary goal.
D. There is a high probability that only one channel will have a missing pulse at any one time or that if multiple channels are missing pulses, they do not all miss at the same time.
If this is an accurate assessment, then I would probably acquire the signals with an analog input DAQ. For each channel identify the rising and falling transistions of the pulses. This can be done with comparison functions and boolean Implies function. Then use a state machine to track transitions. Every channel should have one high to low and one low to high transition before any channel has a second such transition.
Lynn
01-08-2017 05:25 PM
Lynn
1. Correct the frequency of any of the channels I choose to measure will be dictated by the speed of the machine. The frequency of the channels will all match assuming assuming nothing is wrong. This has to be true based on the way the machine is wound.
2. I do believe the pulse width will change. The sensor that switches the signal I am monitoring on and off does so at a particular instantaneous current. That current is a sine wave and say the switch point occurs at 10 amps. When the machine has no load the switching will never occur. When it is at 12 amps peak to peak current the switching will only occur for a very short portion of the sine wave near the peak. When it is at 100 amps the 10 amp instantaneous current will be reached earlier in that cycle. This will make the switching happen sooner and therefore change the pulse width. This is why I believe the width will change for various conditions. This is also why the frequency is controlled by machine speed.
3. The muliple signals are from the different phases within the machine. The windings are physically offset from each other. For these reason monitoring Phase B will be offset 120* from Phase A. It is a little more complicated than that since each phase has two sensors, one for the positive half cycle and one for the negative half cycle. But the phase shifts
4. Correct.
5. Correct.
6. I have 6 signals total.
7.The machine runs 24/7 and the fault on the troublesome channel is is always on the same channel. Call it channel 1. None of the other channels report faults to the built in detector.
Right now I plan on using a USB 6210 for sampling. It is plenty fast and I have it already. I like your idea. I could just time rising edge to rising edge as well. I am not sure how I would implemnet it with a state machine. In my mind I would just have a case statement and if the periods between the good channel and the band channel did not match then record the waveform.. Actually now that I am typing this (and I am not in front of labview) I am not sure how I am going to make sure I measure every single transition within the waveform. Hopefully it will be obvious to me tomorrow when I get in front of a machine.
Finally based on the above clarifications is this something that needs to be done with analog and cannot be done with digital?
Thanks for the help.
Trent
01-08-2017 06:01 PM
Trent,
The additional information makes many things much clearer.
2. Yes, you will get variable duty cycles with that detection.
3. This also means that the phases cannot change relative to each other. That may simplify things.
7. Having only one fault channel and five good ones should also make it easier. Although I would probably try to design the monitoring system with the idea that future faults could be on a different winding.
The USB-6210 has only static digital I/O which means that digital signals can only be read with software timing. While it might keep up with a 300 Hz signal it almost certainly would sometimes miss a narrow pulse when the current is near the threshold. By sampling six analog channels at the maximum rate you should be able to detect pulses down to about 25 microseconds in width.
How does the other sensor on the troublesome channel behave? It seems unlikely that the current in one winding would be significantly different 180° from the first sensor unless the machine was badly out of balance. Can you verify that the sensor and its wiring is good?
I might just measure the duty cycle on each channel in every cycle. This is very simple: number of samples high/(number of samples low + number of samples high) for each cycle. If two or more channels have zero duty cycles, this may indicate no load or low load condition. Under that condition missing pulse detection may not be possible. When all the channels (except possibly one) have pulses, then look for missing pulses or a pulse that is much different than the others to indicate possible faults.
Lynn
01-08-2017 08:49 PM
Lynn
You asked the following:
"How does the other sensor on the troublesome channel behave? It seems unlikely that the current in one winding would be significantly different 180° from the first sensor unless the machine was badly out of balance. Can you verify that the sensor and its wiring is good?"
To clarify one current sensor can measure both forward and reverse current. A fault in either will indicate on the same indicator. So to answer your question I am not sure which half of the sensor may be the bad half. I won't know until I look at some waveforms. Disassembly on this machine is VERY expensive so I am trying to narrow it down first before we start taking things apart.
Missing pulses under a certain threshold is OK, all the indicators just light up anyway and everyone knows why it is happening. I will tinker with Labview tomorrow and see what I can get. To test my code I was thinking of using a waveform read in from a spread sheet with a missing pulse. Short of that I am not sure how to recreate what I think is going on.
How do you reccomend getting my data down to each cycle to then calculate duty cycle?
01-09-2017 08:29 AM
If you have only the pulse sensors (and not the current waveform), then I would start the cycle at the rising edge of one pulse and go to the rising edge of the next pulse. This will not be exactly a cycle when the pulse width changes but the change from cycle to cycle is probably small and this is basically the only information you have available. Since you know the nominal speed range of the machine, you can easily determine when a cycle is too long (missing pulse) or too short (noise?).
LabVIEW has many signal generation VIs which could be used to test your code. You could use a sine generator followed by In Range and Coerce? to get a boolean array. The limits on the In Range and Coerce could be a front panle knob or a low frequency signal generated by another VI. This would let you try many combinations. Of course if you already have real data saved to a spreadsheet that may be used as well.
What version of LV are you using?
Lynn