LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing numbers to digital ports 2 and 3 in CVI

I am trying to convert a sequence of commands in LabView 5.1.1 that writes 582 numbers to digital port 2 into CVI 7.0.

Here is the sequence of commands used in LabView:
DIO Config -> DIO Write -> DIO Start -> DIO Wait -> DIO Clear

According to the DAQ 653x manual what this sequence of commands is doing is called buffered handshaking output. The equivalent code in CVI according to the manual is:

DIG_Grp_Config -> DIG_Grp_Mode -> DIG_Block_Out -> DIG_Block_Check -> DIG_Block_Clear

where DIG_Block_Check needs to be put in a loop until all the points have been written.

The problem I a experiencing is that the number of points remaining to be written never gets to 0. It usually gets to [total number of points] -
32. Thus, the program gets stuck in the loop and never finishes.

What's more interesting is that when I configure the program to write to ports 0 and 1 it works just fine. However, when I try doing the same thing for ports 2 or 3 or both, I encounter the problem above.

What should I do? Am I using the incorrect commands, or am I maybe writing some parameters wrong? Is there something special about ports 2 and 3 that makes it impossible to write more than 32 numbers to them?

I am using a PCI DIO 32-HS card with NI-DAQ 6.9.3

Thanks in advance.
0 Kudos
Message 1 of 3
(3,119 Views)
Hello,


Greetings. When trying to convert an old application, it would probably be better for us to get a simple example working first. Here is where you can find a great example for pattern generation input using a 653x device.

C:\Program Files\National Instruments\CVI70\samples\daq\di\DIdoubleBufHandshake653x.PRJ

After running this program and looking at the code, you should have a better feel for the command calls that are needed.

I would like to mention that the 653x devices can operate in several modes. The two most common are continuous pattern I/O and continuous handshaking (burst) I/O. The difference between the two applications is that one continuously generates a pattern and produces an error if it is unable to keep up with the data rate.
Handshaking applications have the ability to deactivate the proper handshaking lines if the data rate becomes too much.

In order to help with this problem, we will need some more information. Please let us know the answers to the following questions.

1.) Does the above example work for port 0, 1? Does it work for port 2, 3?
2.) If not, could you describe the problem in detail? What are your settings of the initialization variables?
3.) If the above example works, what is the difference between this program and the one that you are creating? What mode are you operating in? Where is your clock coming from? What pins are your signals wired into? (Ack, Req and PCLK specifically)

Just let us know.

Best regards,

Justin T.
National Instruments
Message 2 of 3
(3,119 Views)
Thank you for all your help. I have already solved the problem and thus will not need further assistance at the time. thanks again.
0 Kudos
Message 3 of 3
(3,119 Views)