11-10-2014 02:49 PM
How can i generate an output pulse at every 10 input pulses comming from an encoder?
I need to trigger a sensor at every 10 encoder pulses to get data from the sensor.
11-11-2014 01:02 PM
Hello jyp777,
What you will need is a counter with an if statement that activates a digital output every 10 ticks. To do this, I would look at a LabVIEW example titled: Counter - Count Edges (Continuous Clock) that can be found under Help >> Find Examples... >> Hardware Input and Output >> DAQmx >> Counter Input in LabVIEW. Using this example VI, it should be a simple step to add a condition that triggers a digital output when the count reaches 10.
You can also use a Digital Output example if you need help in this area. These examples can be found by going to :
Help >> Find Examples... >> Hardware Input and Output >> DAQmx >>Digital Output. I would recommend "Digital - Continuous Output.vi".
Happy LabVIEW coding!
Thanks,
11-12-2014 09:17 AM
I came up with this solution.
is this solution reliable?
and i am not getting the accurate results with this solution in the saved file.
11-12-2014 09:25 AM
11-12-2014 10:13 AM
As of now i need to save the output data from Encoder.
and once accurate results are saved then i will go ahead and count the pulses and then trigger a signal at every 10 pulses.
So this is just for saving the encoder results.
11-12-2014 11:20 AM
11-13-2014 07:59 AM
Attached is the VI to save the output of an encoder for channel A.
and the output is not accurate.
11-13-2014 09:33 AM
11-13-2014 10:42 AM
The file contain the stream of 0s and 1s. which is the channel A output.
So right now the stream provides correct number of samples but the stream of 0 and 1 is not in the way it should be(i.e. continuous toggling of 0 and 1 with no repetition). So what i want is continuous stream of 0 and 1 with no repetition.
0 1 0 1 0 1 0 1 0 1 0 1 0 1 like this.
what i am getting right now is 0 0 1 1 1 0 1 0 0 0 1 1 1 1 0 1 0 0 like this.
11-13-2014 11:23 AM