Umm, i'm bit confused now.
I'd like to write a data as 01110 ... to a single channel , let's say port0, channel 0( data can be a serial of data, (data array) or it can be only active high or low ) . it can run in continuous samples ( it continues looping back and output data until user stop or call the task stop vi) or finite samples with the clock source control the rate.
So, in labview, I call daqmx do create channel. vi with linetoassign = port0/line0, then daqmxtimingclock.vi with the clock soure, rate and sample mode. However, when i choose vi to write a single channel, multiple samples, i have error on 1D u8 to 1D u32, exept choosing waveform. Same as if i choose single channel, single samples 1 line (error with buffer size), N line (error with # line different # of data )...
That is one the of question I asked "build digital data". Sorry, I'm not familiar with labview yet
I want to implement SPI with my PCI6229 to communicate my microcontroller according to vi which you put in this thread.
However, it is not working.
My microcontroller 's SPI protocol baud rate is 250kbit/s.
Can you advise me on this problem ?
I have noticed that many people need SPI for higher rates with multifunctional DAQ (M series). I had simmilar question, hence I I prepared simple example for you.
You will find HW timed Master with one implemented mode. You can modify this example to operate as a master in different mode.
How it works?
1) 8 bit word of MOSI data is prepared.
2) Slave Select (SS) signal has to goes low.
3) Falling edge of SS starts finite pulse train generation on counter (triggered by SS falling edge).
4) Counter output is used as Sample Clock Source for Digital Input / Output (Falling edge / Rising Edge)
I think it is important to note following:
a) SS is SW timed
b) CLK is HW timed
Note that 130 bits of MOSI data is prepared, however just 8 bits is written. This is due to minimum output budder size for digital output buffer.
If you found any mistake of mine, please let me know. (I'm sorry for bit messy code, but hope you can deal with )
FYI to all, NI Systems Engineering has released libraries for building hardware-timed protocol waveforms that can be generated/acquired using clocked DIO hardware. The SPI and JTAG libraries can be used with NI-DAQ correlated DIO tasks on any M-series board. (The I2C library requires open-collector output, which is only supported on the 6534 and 655x.)
As M series card's digital lines ; like the ones in 6229 can be configured to high impedence state (apart from Low and High ) , can SDA be made tristate before
reading the Acknowledgement bit so that it can be used as a bidirectional line ;needed in I2C.Pls let me know ,as i have to use this card for
Hi JeyZ -
Someone asked about using the IDW library with a DAQ device over in that thread. Here is my response to him: http://forums.ni.com/ni/board/message?board.id=Components&message.id=106#M106