LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from Excel File and Write to Digital Port

Hi Charlie,

Thanks for looking over the code, I am fairly sure that this issue is not a DAQ issue, but a problem with the reshaping of the "raw binary" into the 2D binary ("parsed binary").

Attached below, I have the current program, along with some spreadsheets that contain some random data. Note that in the 5x5 matrix, using the Digital Channel List of 0:6 works just fine (as 5x5 = 25, and is not a multiple of 4). However, when using the 4x3 matrix, rather than using 0:2, it requires me to use 0:3 in the Digital Channel List (I have just tested this).

When loading the 4x3 matrix, you will notice that when the RUN button is pressed, in the "parsed binary" LED indicators, you will notice that rather than having 3 rows of LEDs active, a 4th row is active (which would explain the necessity of setting the Digital Channel List to 0:3 rather than 0:2). However, I am not sure how to fix this.

Your help is appreciated,

Message Edited by Anthony_Wong on 06-22-2006 03:32 PM

Anthony Wong
University of Toronto
Chemistry Department
Download All
0 Kudos
Message 21 of 23
(545 Views)
Hi Anthony,
 
There were a few flaws in the original code I posted -- oops! I was appending an empty array to the end of the 2D binary array if it divided evenly by 8. I have attached modified code that should *hopefull* work this time.
 
Have a good weekend!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 22 of 23
(534 Views)
Hi Charlie,

Actually, I realized that today as well, and managed a fix of my own, which was similar to yours (I used a case structure where the case selector was whether or not the remainder = 0).

Thanks for your continuing support, have a nice weekend.  
Anthony Wong
University of Toronto
Chemistry Department
0 Kudos
Message 23 of 23
(531 Views)