Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

pattern of pulse signals in pci-6602

I am sorry forget to attach the program.
0 Kudos
Message 11 of 15
(1,865 Views)
casu,

Hello again. I've attached a modified example that may help some. Unfortunately, I'm not able to test it now with a 6602, so there may be some small tweaks needed.

Changing freq on-the-fly should be possible, but my previous example didn't try to implement it. I've added it to this one.

I also restructured the way the RPM reading was done by putting it in a separate loop. I made it a continuous measurement, and always read the most recent already-buffered data to compute a median RPM. If you'll always read the same # of samples, I *think* you can place the DAQmx Read property node before the lower loop rather than inside it. But without hw to test it, I'm not certain.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 12 of 15
(1,840 Views)
hi kevin
thanks a lot for helping me doing this project . frequency change on the fly works but RPM reading still show me error . I tried also placing the "DAQmx property node" outside the while loop. still showed me the same error. this is the error I got.


Possible reason(s):
Invalid combination of position and offset. The position and offset specified a sample prior to the first sample acquired (sample 0).
Make sure any negative read offset specified will select a valid sample when combined with the read position.
Property: RelativeTo
Corresponding Value: Current Read Position

Property: Offset
Corresponding Value: -5
Task Name: _unnamedTask


thanks again
casu
0 Kudos
Message 13 of 15
(1,824 Views)
casu,

The method I was using to read RPM was to read 5 samples at an offset of -5 from the most recent sample. In effect, this asks for the 5 most recently sampled values without having to wait. The error you're getting means that 5 samples haven't yet been taken.

Because I also put a fairly large delay (2500 msec) before the first attempt to read, I'm wondering whether you really have a good signal coming into your RPM measurement counter.

Try putting a case structure around the lower RPM reading loop and set the constant so the loop never runs. Then go into MAX and see if you can count edges with counter 6. Note that if you are wired to the non-default PFI pin, you'll need to configure the example program the same way. I think it's a DAQmx Channel property node and the property name is something like 'input terminal' or 'source terminal'.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 14 of 15
(1,816 Views)
Hi Kevin thanks for helping me doing this project. I think I found out that the speed sensor give me analog signal instead of digital which is not supported by the DAQ card I use. So I don't have to worry about the RPM display.
Anyway thanks again.

casu
0 Kudos
Message 15 of 15
(1,794 Views)