07-27-2009 08:31 AM
07-27-2009 09:02 AM
Hello,
Are you trying to use the same counter as both input and output? This is what is causing your error.
You have an auto-index on your for loop tunnels, this is creating a task for every item in your array. However the input array constants for both your counter input and counter output tasks are the same!
If you want to use 3 counters that are different counters to the 4 input counters, then change your array constant to the correct counters.
If you want to use the same counter as both an input and output, then you cannot do this at the same time- you'll do it sequentially by starting a task as input, running it, stopping it, then reinitialise it as an output and restarting it.
I hope this helps!
Mark
07-27-2009 09:20 AM
I have 7 PXI-6602 counter cards, for 2 of those cards I am trying to use four counters to read a pulse and 3 counters to write a pulse on the same card. Is it not possible to read and write on the same card even though I am using different counters, (this is what I understand from your last sentence)?
For a previous application I have been able to read 32 Analog inputs and write on 2 analog outputs on the same card using a structure similar to the figure I have provided. Why wouldn't I be able to do the same with counters is my main problem? Thanks for the help.
07-27-2009 09:53 AM
Hello,
I now see what you are trying to do now! Thanks for explaining. What I now understand is that you are trying to use different counters on the same card. Could you post the VI for me to look at?
Thanks
07-27-2009 10:18 AM
07-28-2009 03:47 AM - edited 07-28-2009 03:48 AM
Please see attached.
Whilst you are using these 3 channels in the next step of the sequence, not in the same step, the task is still reserved because it hasn't 'stopped'
I hope this helps
07-28-2009 08:46 AM
I have tried removing the sequence and letting all task create at the same time though I get the same error message that the card is reserved (error message -50103).
07-28-2009 10:21 AM
07-28-2009 10:50 AM
07-28-2009 11:01 AM
Hello,
That is fair enough!:
- If you want to Count Frequency and Generate Frequency at the same time on the same counter, then the hardware will not allow this.
But as you used a sequence in your original code, I think it is more likely this answer applies:
- If you are trying to take a frequency measurement then generate a frequency in the next frame of the sequence after some time; before starting your Counter Output task, make sure the Counter Input task for the counters you are sharing are stopped, using this:
This will unreserve your counters to be used for the next task.