02-27-2013 09:16 AM
Hi David,
After I download the SPI Digital Waveform Reference Library in the link:http://zone.ni.com/devzone/cda/epd/p/id/6163 and install it, I get a install error, it says:"InstallerError 11005 Fatal Error. Unable to find initialization file." Why is that?
Software information of my computer: windows 7, LabVIEW 2011 and LabVIEW 2012.
Thanks very much!
Pengyu Zhou
Guangzhou, China.
07-09-2013 06:26 AM
Hello Dear.
I have NI 6009 usb Daq card and I want to acquire analyze abd control signals from multiple sensors. Problem is that despite of analog sensors I have got two digital sensors, and for getting signals from them I have to do serial Communication and I want to do it with SPI. Is it possible to do it or any other solution ????? Urgent Help needed.
Thanks in Advance.
Naseem Abbas Solangi.
07-09-2013 08:59 AM
Hay Naseem,
You probably should have started a new thread. Regardless, you aren't going to be able to do SPI communication with the 6009, as the digital lines are static (not clocked).
If you want to use the SPI digital Waveform Library you would need a DAQ card with clocked digital lines, like the NI USB-6341. A cheaper option, and perhaps easier if you simply want to add functionality to a system already using the 6009 would be to get a NI USB-8452.
Regards,
Dan King
07-10-2013 04:59 AM
Thanks Dan;
Since I am bit new to Labview and Daqs, can you sujjest me any solution for doing Serial Communication via NI 6009 without buying any device ??? The thing that I am trying to ask is that Serial Communication is possible via NI 6009 or not. Thanks
With Kind Regards
Naseem Abbas Solangi.
07-10-2013 07:10 AM
Hello Naseem,
The problem is that serial communication generally requires a clock signal; SPI requires a clock signal. The 6009 doesn't have clocked digital lines. It may be possible to software time your lines if you could run at around 100 Hz, but that's not even going to be close to where you need to run a SPI bus.
In short, the 6009 will not work as part of a SPI solution. You need to get another device if you want to perform SPI communication.
Regards,
Dan King
07-24-2013 03:23 AM - edited 07-24-2013 03:30 AM
07-24-2013 08:28 AM
Hello Priyatham,
Without seeing the code in question that question is a little more difficult. You could try the Write to Measurement File Express VI as a quick solution, with lower level VIs as a backup if you need a very particular format to your file. If that doesn't work, post either your code or a small VI that simulates the specific sction of code that you want to add functionality to.
Regards,
Dan King
07-24-2013 01:05 PM
Hi Dan
Thanks a lot for the reply. I'm attaching my SPI Read code here. I remember starting off with an example that was posted in this forum and only modifying it slightly. So you might be very familiar with this. Please let me know if you need something else.
Regards,
Priyatham.
07-24-2013 02:50 PM
Hello Priyatham,
I took a look at your code. It looks like you want to decode your returned data and save the decoded bitstream. The truth is, once the binary data is decoded, saving to a file is as easy as using the Write to Spreadsheet VI or creating your own custom file I/O subVI.
As for decoding the bit stream, I think the following bit of code is close to what you need:
This should get you past the hard part. In terms of File I/O I would check out the File I/O shipping examples that come with LabVIEW for pointers on that aspect of your code.
Regards,
Dan King
07-24-2013 07:10 PM
Hi Dan
Thanks a lot for the help, that worked!!! I deleted the first few elements of the decoded array(until it has valid output data on MISO) and used Write to Spreadsheet file VI to output the data into an excel file.
The only thing is that in my excel file information is displayed bitwise and I would like to have them displayed as bytes. For example the excel file looks like(I used the Transpose True in Write to Spreadsheet VI):
1
0
0
1
1
0
0
1
1
0
1
0
0
1
0
1
And I would like it to look like:
10011001
10100101
Basically I would like to convert the bit wise array into bytes. I have been looking into different functions, but haven't found a way to do it so far. Is there any function in Labview I can use to do this?
Regards,
Priyatham.