Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Input and Output from a 6534

Hello

I am after some advice regarding my PCI 6543 digital I/O card and the best way to achieve my desired results. I am programming in Visual C++ with Ni-DAQ 7.

I want to generate a pattern output from one of the ports, Port A, following a software command. This pattern consists of a 10uS pulse on DIOA0, that repeats 200 times with a period of 100uS. I want this DIOA0 output line to initiate an input on ports C and D, possibly through the REQ pin. Consequently the input should acquire 200 times for each call to the pattern output.

I want this to repeat, so the pattern output goes again (as in a FOR loop), and the input occurs again for an as yet undetermined number of times.

I have managed to get something worki
ng for 1 iteration, and I can generate multiple pattern outputs, but the inputs only seem to acquire for the 1st iteration. However, if I step through the code in debug mode I can get the input to work correctly.

Any ideas would be gratefully appreciated.

I am still trying to get some earlier problems with this application solved.

Kind Regards

Jamie
0 Kudos
Message 1 of 3
(3,340 Views)
Jamie,

I just posted a similar question regarding the PCI-6534, for a similar application to yours. To get the output to loop continuously, I used the Set_DAQ_Device_Info function to enable the Pattern looping. With this, you write your data to the output group on-board memory only once with the DIG_Block_Out function. The board will automatically loop until you disable it using the Set_DAQ_Device_Info again.

Hope this helps you out -

Jason
0 Kudos
Message 2 of 3
(3,340 Views)
Hi Jamie,

There are a couple different ways you can loop from a buffer. You can either use the onboard memory of the 6534 and loop from there or you can specify as a software configuration that the board loop through the PC memory buffer.

For the onboard looping you need to specify the following:
iStatus = Set_DAQ_Device_Info (1, ND_PATTERN_GENERATION_LOOP_ENABLE, ND_ON);

For software, PC memory looping, the following function specifies this:
iStatus = DIG_DB_Config (iDevice, iGroup, 1, 0, 1);

I attached a couple programs that might be of use. Check this post:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000008BA10000&USEARCHCONTEXT_CATEGORY_0=_31_%24_12_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_31_%24_1
2_&UCATEGORY_S=0

Hope that helps. Have a good day.

Ron
0 Kudos
Message 3 of 3
(3,340 Views)