DO_ContWritePort Previous topicNext topicFirst topicLast topic

DO_ContWritePort

@ Description

This function performs continuous digital output on the specified digital output port at a rate as close to the rate you specified.

@ Cards Support

7200, 7300A

@ Syntax

I16 DO_ContWritePort (U16 CardNumber, U16 Port, void *Buffer, U32 WriteCount, U16 Iterations, F32 SampleRate, U16 SyncMode)

@ Parameter

CardNumber : The card id of the card that want to perform this operation.
Port :             Digital output port number.
                     For PCI-7200/cPCI-7200 and PCI-7300A/cPCI-7300A, this argument must be set to 0.
Buffer :          The starting address of the memory containing the output data.
                     This memory must has been allocated for enough space to store output data.
WriteCount :   WriteCount is the number of output operation to be performed.
Iterations :      the number of times the data in Buffer to output to the Port.
                     A value of 0 means that digital output operation proceeds indefinitely.
                     If the digital ouput operation is performed synchronously, this argument must be set as 1.
SampleRate : The sampling rate you want for digital output in hertz (samples per second).
                    Your maximum rate depends on the card type and your computer system.
                    This argument is only useful if the DO trigger mode was set as internal programmable pacer
                    (TRIG_INT_PACER and TRIG_DO_CLK_TIMER_ACK) by calling DO_7200_Config() or
                    DO_7300_Config(). For the other settings, you have to set this argument as
                    CLKSRC_EXT_SampRate.
SyncMode :   Whether this operation is performed synchronously or asynchronously.
                    Valid values:
                      SYNCH_OP   : synchronous digital input, that is, the function does not return until the
                                             digital input operation complete.
                      ASYNCH_OP : asynchronous digital input operation

@ Return Code

NoError, ErrorInvalidCardNumber, ErrorCardNotRegistered, ErrorFuncNotSupport, ErrorInvalidIoChannel, ErrorTransferCountTooLarge , ErrorContIoNotAllowed
 


Note: Because the scatter-gather mechanism used by PCI7300A, the memory space allocated in your process will be locked before passing the virtual address to the device drivers, and be unlocked after the data acquisition is completed. However, Linux does not give the permission of mlock/munlock to everyone. Only the processes with root privilege can lock/unlock the memory. If your process call this function for PCI7300A_RevA or PCI7300A_RevB, it must have the root privilege.