LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Writing Spreadsheets to labview memory Please Help!

Andy,

         I have a question about digital line write, I know this is a LabVIEW DAQ function, but i'm having trouble finding it within the program.  How exactly does it work?  Does it send one line of boolean to the device you are working with or does it save this data on the computer then the device?  For spreadsheet data would I need to use a loop so that it could read every line one at a time?  Could I demo digitally writing and reading a spreadsheet file using these DAQ functions without the actual device hooked up?  Especially when the spreadsheet is read back digitally and converted back into spreadsheet format?  This is where all my confusion lies.  Thanks alot!

 

Philip 

0 Kudos
Message 11 of 24
(1,576 Views)

Let's take this one step at a time. Why don't you post an example of a spreadsheet that you want to read with a little explanation of what the data in it represents. For example, you say that it contains hex data. If you have multiple columns, is each column a different port of digital I/O or something else? Are you trying to write to x number of pins on your device and then read x number of a different set of pins on your device? I would also strongly recomend that you save your Excel spreadsheet as a comma or tab separated text file. Reading a native Excel file can be done but it's much more comlicated and I don't think you need any more complication right now.

Digital I/O can write either a single pin at a time or multiple lines at once. There is usually no saving of data before the DAQ board is commanded to output. Have you looked at the shipping examples for digital I/O?

Message 12 of 24
(1,571 Views)

I can't find the shipping examples for digital I/O??  Yes I am writing/reading to specific pins.  Two files are uploaded to the device, a data file and an instruction file.  What is the difference between the ways to approach the digital write, comparing doing it line by line etc.  An example spreadsheet file is attached, both data and insruction files would look similiar, usually having 2 columns and 256 rows. Thanks!!

 

Philip

0 Kudos
Message 13 of 24
(1,565 Views)
also if i knew the exact pins that the device would be using for its various functions , would i be able to write a program for it without actually physically having the device board with me at this point in time.
0 Kudos
Message 14 of 24
(1,561 Views)

As Dennis said, if you can give an example of a spreadsheet file (preferably in the "tab delimited" format suggested by and earlier post) and tell us what DAQ card you were planning on using it would help. In the versions of Measurement & Automation Explorer ("MAX") since about a year ago (using the DAQmx 7.5 or newer driver) there has been available the capability of telling MAX that you actually have the instrument installed and it could be configured to simulate it (to a point). So this would allow you to write and do a lot of the debugging of your program without actually having the DAQ card.

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 15 of 24
(1,555 Views)
Okay, so here is a very simple example. Since you did not specify what each colum in the file was supposed to represent, I just wrote something that took what was in column 1 and wrote it out to a digital port. The Read From Spreadsheet will read the entire file and convert the text to numbers. The for loop will auto-index each row read automatically. It's then just a matter of getting column 1. The digital I/O code is straight from the shipping example called Write Dig Port. As Putnam says, you can run just about everything you want without hardware. The one thing you can't do is do an actual read of data but you could certainly simulate something yourself.
Message 16 of 24
(1,549 Views)
Thanks for everyone's help!  I recently realized that at this point I only need to write a program capable of sending digital signals of spreadsheet data to the PGA (pin grid array), and then be able to read digital signals back from the PGA and convert them back into spreadsheet form.  This means that the pin mapping and related tasks will come after this is completed.  This seems like a much less complicated task, but as I still do not fully understand digital ports and digital reads and writes, some example code would be very very helpful.  About which DAQ card I am using, I'm not completely sure but the data is being sent to a UP2 board if that is helpful.  Example code of digital data being read back from DAQ and converted back into a spreadsheet would be really helpful.  Thanks everybody.
 
Philip

Message Edited by pdb511 on 06-03-2006 12:15 PM

0 Kudos
Message 17 of 24
(1,531 Views)
Would this file work as a simple way to read data and convert it back into a spreadsheet?  I'm not sure about the auto indexing.  Thanks!!
0 Kudos
Message 18 of 24
(1,526 Views)
Hey Guys, here's a simple demo I built, how can I configure the dig write/read to use both columns of my spreadsheet data??  Thanks in advance.
 
 
Philip
0 Kudos
Message 19 of 24
(1,521 Views)

Hey Andy, do you have any idea how I would be able to accomplish the digital read/ write task I explained?  That being, using the demo I posted but changing it so that it would be able to digitally read and write both columns in a two column spreadsheet??  Thanks!

 

Philip

0 Kudos
Message 20 of 24
(1,508 Views)