09-24-2012 12:43 PM
Hello,
I have a short question on a sample clock source through RTSI.
In my setup, two PCI cards (PCI-6602 (dev2) and PCI-6110 (dev1)) are connected through a RTSI cable.
I'd like to generate a sample clock source on 6110 and use it on 6602 to count external input pulses.
In MAX test panel, I checked a counter was reading the external signals.
However, the attached vi do not work and count at all, then give an error of 200284.
Could you tell me what is wrong?
I guess something is not right on routing the clock signal. Do I need to use DAXmx connect terminals vi instead of external signal?
How can I check the two devices are connected properly through a RTSI cable?
I registered the cable and connected the devices on MAX without any issues. Is that enough?
Thank you for your kind suggesion and comments.
Solved! Go to Solution.
09-25-2012 05:17 PM
Hi sugar7,
I have attached a link to a sample code very similar to the behavior that you are hoping for. The while loop will allow the code to continue running and pull out a number of samples based on the number of samples specified in the counter read operation each time the loop iterates. If you know the number of samples you plan to take each time the VI runs, the best way is to change the sample clocks to finite samples and specify the number of samples.
https://decibel.ni.com/content/docs/DOC-14202
09-25-2012 07:17 PM
Hello Ben,
Thank you for your reply.
I took a look at the link you showed, but it's still not clear why
my code doesn't count when the sample clock source was generated in another PCI card and rounted to the counter
through a RTSI cable.
If I output sample clock pulses in the same counter as counting, then the vi works and returned a correct number of counted pulses.
So, most likely the vi has problems with routing using the RTSI cable.
When PCI cards are connected with a RTSI cable, should connectors be orientated in a certain direction?
Thank you for your kind support.
09-26-2012 05:06 PM
Hi Sugar7,
There are some more simple ways of using the hardware clock on the 6110 as the timebase of the 6602. I have attached a code that shows how the timing property node can be used to set the timebase of the 6602 task. The attached screen shot also shows this property node. Using this property node, you will no longer need the counter output task from the 6110, so the only task line will be the counter acquire task.
The other change that you might consider is changing the sample mode of the sample clock to finite samples as you seem to be acquiring a finite number of samples before the task ends. If you would like the code to continue acquiring data points, then you may want to utilize a while loop around the read operation.
09-26-2012 07:09 PM
Hello,
Thank you for your suggestions.
I modified the original vi as attached.
In the sampling part, a loop was omitted for simplicity.
I'm not sure this is what you meant and the vi still doesn't count.
I still get error 200284 and wondering what should be connected as a source to DAQmx timing.
Withoug source, I got error 200303 because this is buffered event counting.
best,
09-27-2012 05:22 PM
Greetings, Sugar7;
After having taken a quick look at your VI, I had a few questions. You are using the Dev1 20MHz Timebase for the acquisition as per the input into the property node, correct?
Take a quick look at the following example, it might be of aid. Basically, in this one they explicitly demonstrate how to do export the timebase from one and into the other, which is, if I understand correctly, a part of the problem:
https://decibel.ni.com/content/docs/DOC-12184
I believe that in our case we would have a very similar task setup; we simply would not have the reading VI's on the top.
Does that help?
09-28-2012 04:35 PM
Several things briefly:
-Kevin P
09-28-2012 05:08 PM
Here's a 2010 snippet of the example vi:
-Kevin P
09-28-2012 08:08 PM
Hello,
Thank you for all of your comments and suggestions.
Most likely, the problem was due to the cable connection.
I use an extended RTSI cable from NI and after I changed connectors, then
my original vi (posted pictures) could count external pulses without any problems.
In the test vi posted, I tried to incorporate a suggestion made by Ben, though it wasn't clear to me.
I set sample clock at 1 kHz for counting. Is this still to fast?
Anyway, I appreciate your kind help and your time.