Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 6534 digital output waveform

I'm trying to generate a continuous periodic pattern with NI 6534. This works in principle, but my problem is that a logic 1 is not high during the whole clock cycle but falls back to low every time in the second half of the clock cycle.
i.E. if I output constant 1, the output actually is 101010...
 
Is it somehow possible to have the data available for the whole clock cycle?
 
I'm running at maximum speed, but the behaviour is the same when I reduce the output frequency.
 
The code I wrote is something like:
 
 int  state0=0x00,state1=0xFF;
 ushort blockdata[4];
 DIG_Grp_Config (BoardID, Group2, 1, PortC, 1);
 DIG_Grp_Mode (BoardID, Group2, 0, 0, 0, 0, 0);
 DIG_Block_PG_Config (BoardID, Group2, 2, 0, -3, 1, 0);
 
 Set_DAQ_Device_Info(BoardID,ND_PATTERN_GENERATION_LOOP_ENABLE,ND_ON);
 blockdata[0]=state1;
 blockdata[1]=state1;
 blockdata[2]=state1;
 blockdata[3]=state1;
 
 DIG_Block_Out (BoardID, Group2, blockdata, 4);
Any hint is highly appreciated.
 
Regards,
Sven
0 Kudos
Message 1 of 2
(3,373 Views)
I figured out that in 8 bit mode, DIG_Block_Out takes the low AND the high byte of the data array as seperate samples. In my example, I only set the low byte to 0xFF while leaving the high byte to 0, leading to an output of 0101...
The easiest way of using
DIG_Block_Out is to have a unsigned char[] array (or short in 16bit mode, or long in 32 bit mode, respectively) with the sample data, and to typecase it to a short array when handing the pointer to DIG_Block_Out.

0 Kudos
Message 2 of 2
(3,356 Views)