Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Retriggerable single pulses on the PC-TIO-10

I have been given the responsibility to upgrade a machine with a PC-TIO-10 and an AT-MIO-16D to 32bit windows (NT). I am using NIDAQ6.1, which is the latest driver to support both cards. The problem I am having is with the PC-TIO-10 card. It has 10 counters. We have a trigger signal coming into the PC-TIO-10 card that causes counters 2,3,4,5 to generate a single pulse with different delays. Each time the PC-TIO-10 sees a new trigger signal, counters 2,3,4,5 generate a new single pulse, each with a different delay from the trigger. We then use these pulses to gate counters 6,7,8, and 9 for photon counting.

Originally, our software had direct access to the PC-TIO-10 card and we were able to set the card up to do a single pulse for every trigger. Currently, I don't think the NIDAQ 6.1 API supports this behavior. I can generate a single pulse, but just once, for the first trigger. I can also generate a "CTR_Square" to generate a pulse for every trigger, but I can't set the delay, appropiately because it must go high first, and then low. This method is best because none of the pulses are dropped, but again, I can't set up the delay from the trigger. I have set up Event messages so my software could reset the single pulses, but pulses get dropped too frequently.

I then looked into the API to perhaps write directly to the PC-TIO-10 registers but REG_Level_Write doesn't seem to support the PC-TIO-10. Reg_Level_Write does seem to support other boards with the same counter chip though.

Any ideas? Is it possible to get a single, repeatable, pulse with a delay from a trigger or has the move from DOS support to win32 killed that ability?
Does the latest NIDAQ API support this ability and if so, which counter card? We would need a counter card with 10 counters.


0 Kudos
Message 1 of 5
(3,950 Views)
Galroc,

Thanks for posting to the NI Forums.  The PC-TIO-10 is a rather old card and I don't have a ton of exerience programming with the 9513 API but I suspect if you were able to do it with DOS there may be a way to do it with the NI-DAQ API.   I am still spending some time brushing up on the manuals and will let you know what I find.  I know for a fact that performing this type of acquisition is possible with our newer cards and the more current NI-DAQmx API.  The PCI-6602 has 8 counters, so you would likely need to get more than one card to move to the newer platform.  I think it may be a good idea if your budget supports it since the PC-TIO-10 is not even supported on Windows XP.

Let me know if making the switch is appealing or realistic for your application and I will let you know more information.  In the meantime I am going to brush up on my PC-TIO-10 programming knowledge and let you know what I discover.

Regards,

Neil S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,924 Views)
Galroc,

It seems from the API for NI-DAQ there is not a way to have the counter rearm itself after each trigger.  In NI-DAQ you would typically call:

  1. CTR_Config  //to set up the trigger
  2. CTR_Pulse  // to set up pulse width and delay
  3. Delay  // to wait for the pulse to be generated
  4. CTR_Restart
  5. Go back to step 3
This may be how you have already tried to accomplish your application.  Unfortunately I don't have a computer with Windows NT or earlier with a PC slot to be able to verify this order of operations will work.  It may be necessary to move to a newer card to get it to work on the Win32 architecture.  I know this type of operation is possible with the PCI-6602.

Let me know if you have any questions.

Regards,

Neil S.
Applications Engineer
National Instruments

0 Kudos
Message 3 of 5
(3,921 Views)
Yes, that is exactly how I am doing it at the moment...and the code is improving where I am not seeing as many dropped pulses...

I have the CTR_Restart() in a call back function activated by an interrupt by using Config_DAQ_Event_Message. Timing is key and if the repulses happened in hardware instead of a call back function, I would be all set.

I have been looking at the PCI-6602 and you said that card has the ability to retrigger a pulse with a delay...in hardware?

My plan is to get the current software working and understand it as I go along. Once everything is functional and usable, I would like to move to a more modern counter card and drop the second card, an AT-MIO-16D, because I don't think we need those abilities. The new counter card has enough digitial in/out...and I will dropping the ability to do A<->D. I might even move the program over to Linux since I think you support Linux now.... 🙂

Thanks for your help.



0 Kudos
Message 4 of 5
(3,918 Views)
Galroc,

Yes, the 6602 can retrigger a single pulse generation.  However, if you only use a single counter on the board it only applies the delay to the first pulse that is generated from a trigger.  All subsequent pulses do not have the delay.  However, you can use a counter to trigger a second counter.  In this case the actual trigger triggers the first counter which then generates a new pulse with the duration of the delay.  On the falling edge of the pulse the second counter is triggered that causes it  to output the trigger you desire.  The drawback with the solution is you would need to reserve 2 counters for each output train.  However since you would need two counter boards to meet the requirement of 10 counters this may be a feasible solution anyway.

A side benefit of making the jump is that you would be moving to a card supported on both Windows XP and Windows Vista which could give your test system more longevity.  The 6602 is also supported on the Linux distros of Red Hat WS 3, Mandrivia 10.1 Official, Mandrivia 2006, and SUSE Linux Professional 9.2 and 9.3.

Let me know if you have any further questions.

Regards,

Neil S.
Applications Engineer
National Instruments

Message Edited by Neil S. on 04-12-2007 04:23 PM

0 Kudos
Message 5 of 5
(3,909 Views)