Hi,
I wonder if someone would be able to give me a little advice, with a counter I am having trouble with.
First, about my application. I am (trying to) control a point on wave switch from labview. The switch turns on when it receives a digital 1 and off again when that signal returns to a 0. While the switch is on it sends out a signal which is constantly 5V but has a zero pulse when it's 'input' waveform passes through zero. Additionally the switch has a hardware setting that allows you to set at which point in the waveform the switch will turn on. (i.e. if you set 0 the switch turns on at the begining of the next voltage cycle after receiving the on signal, if you put 90degrees it waits until 90degrees into the voltage cycle to turn on). I want to control the number of waveform cycles the switch 'lets through' and the point at which it turns on.
In labview I send a digital 1 to turn the switch on and use a counter to count the number of pulses coming back from the switch, when the number of pulses corresponds to the number of voltage cycles I want I send a 0 to turn the switch off. This works fine when I have the switch hardware setting set to turn on at 0 degrees, but when I increase this angle setting past about 10 degrees the counter which I am using to count the pulses goes a bit awry and seems to start at anything from 6 to 78 or more, causing my application to fail.
Does anyone have an idea why this might be happening. I have looked at the signals coming from the switch on a scope and they look the same in both cases, i.e. the signal does not appear to be more noisy when I increase the angle setting. Is there some setting I should be using in labview when starting counters that I am not aware of (I am new to labview)?
Thanks for any help! (I code post my code if it helps when I get back to the lab tomorrow)
Andy