07-21-2015 09:30 AM
Hi All,
I'm using PXI-6284 which has 2 counters on it, and I'm outputting 2 pulse trains using these 2 counters. Using an "elapsed time" function to control the number of pulses is not very accurate and I cannot use the finite samples option as there are no free counters.
How can I use the elapsed time function to control the output roughly, and then after the fact get the actual number of pulses that were made? CO.Count is not very useful here.
I need to be able to compare the number of pulses made with the PXI module against the number counted by the microcontroller on my DUT.
Please help.
Best,
Adrian
07-22-2015 06:46 PM
Hello;
Is it possible for you to attach an image of the code you have developed ? What do you mean by control the output roughly ?
Regards,
07-23-2015 01:04 AM
Hi PQM,
What I mean by roughly, is by using software control, which is variable.
I say this based on empirical evidence. After running the setup many times, the number of pulses counted by the microcontroller varies without any changes to the VI. When I reduce my output to only 1 pulse train and use the finite number of pulses, the microcontroller count matches the number of outputs.
In addition, the elapsed time output is variable (see comment in VI).
So to recap, what I need to know is - Is it possible to run the code as attached (or improved by any ideas?) and read a property or value that records the exact number of pulses that were generated by the task (even if it is for only 1 of the counters)?
Please see the code attached.
Best Regards,
Adrian
07-27-2015 03:48 PM
Hello Adrian;
I think the following link is useful in this case:
Please take a look of it !
Regards,
Pablo
07-28-2015 01:27 AM
Hi Pablo,
Thanks once again for you efforts!
That post was looking very good, as the OP had the same problem as I do. I also have the same problem with the proposed solutions though, with it not being a buffered output.
The other solution of the 2 DIO's is crafty and I've seen that idea implemented before.
What I've done to get around the software timing issue (*for the interim) is to build in some tolerance in TestStand. I've set it up so that the VI runs and re-runs until the "correct" elapsed time is reported, which results in a known number of pulses (also with some tolerance). This is by no means the solution I want, so I'm still looking.
I am afraid though, that this is a hardware problem and cannot be solved in software.
Thanks again!
Best,
Adrian
09-03-2015 03:27 PM
Will the following work (or is it too late)?
Start finite digital 1 line write with 1 s buffer (all zeros), regenerate. Clock - counter 1 output. Software elapsed time will give you approximate time, propery Write -> current write position - gives exact count when counter stopped.