From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save daq data-in(from 2 channels) in 2-D arrey?

Solved!
Go to solution

@Dennis_Knutson wrote:
There is nothing related to ActiveX with the Write to Spreadsheet File.

If you do not provide a path with a front panel control or the file dialog function outside a loop, you will be prompted for a file path when the function is called. The function outputs this file and with a shift register containing the path, the next time the function is called inside the loop, the previously selected path will be used and you will not be prompted.

So, you can use a front panel path control, the file path dialog, or a shift register.

thank you veryyyy much...

could you please show me who can i use " a front panel path control, the file path dialog, or a shift register." ?

i attached my file that shows me error 43 when i want to save it.

0 Kudos
Message 21 of 34
(936 Views)
Solution
Accepted by topic author Eram

Error 43 results from the user hitting the Cancel button on a file dialog.

 

Your use of the shift register is appropriate. You may want to make the the append to file input False on the first iteration and True on all later iterations so that it creates the file when the VI starts and then appends to it on subsequent iterations.

 

Use Build Array not Build Matrix. In LV the Matrix data type should only be used when performing specialized linear algebra operations that do not work on arrays.

 

For fixed number of iterations use a for loop rather than a while loop and a comparison. 

 

Lynn

 

Spreadsheet file.png

Message 22 of 34
(928 Views)

@johnsold wrote:

Error 43 results from the user hitting the Cancel button on a file dialog.

 

Your use of the shift register is appropriate. You may want to make the the append to file input False on the first iteration and True on all later iterations so that it creates the file when the VI starts and then appends to it on subsequent iterations.

 

Use Build Array not Build Matrix. In LV the Matrix data type should only be used when performing specialized linear algebra operations that do not work on arrays.

 

For fixed number of iterations use a for loop rather than a while loop and a comparison. 

 

Lynn

 

 


thank you  johnsold...

I did whatever you mentioned but my problem doesn't fix.i mean even when i enter a path(file.txt) and press ok button,another window (exactly the same as previous)appears and want me to enter a path.if i enter a new one and press ok this process will be repeated ... ! but when i press cancel i see error43.

I think i didn't use shift register in an appropriate way?is it right? i attached my vi...excuse me for my repetitious questions..

thank you.. 

0 Kudos
Message 23 of 34
(913 Views)
Attach an image of the block diagram. I'm sure you did not use the shift register correctly.
Message 24 of 34
(909 Views)

@Dennis_Knutson wrote:
Attach an image of the block diagram. I'm sure you did not use the shift register correctly.

I attached the image.thanks

0 Kudos
Message 25 of 34
(905 Views)
You didn't wire the shift register to anything. Look again at Lynn's example.

You really need to take the free tutorials.
Message 26 of 34
(898 Views)
Solution
Accepted by topic author Eram

As Dennis pointed out you did not connect the pieces and parts as I recommended.

 

Lynn

Message 27 of 34
(890 Views)

@johnsold wrote:

As Dennis pointed out you did not connect the pieces and parts as I recommended.

 

Lynn


thank you very much lynn...

Now i fixed my problem and i can save data in txt file.

excuse me for my another 2  Questions :

1-Can i save data directly to excel file?

1-Can i use 2 channel of  DAQ-Assistant instead of (X)and (X^2) ? 

 

thanks alot.

 

0 Kudos
Message 28 of 34
(877 Views)
Yes, you can use the Report Generation Toolkit functions, Write to Measurement File, or low level ActiveX. Hundreds of available examples.

You can have as many channels as your DAQ board has.
Message 29 of 34
(873 Views)

@Dennis_Knutson wrote:
You didn't wire the shift register to anything. Look again at Lynn's example.

You really need to take the free tutorials.

thank you Denniss_knuts on

Yes you are Right but i couldn't  find good  tutorials.beacause reading and understanding  english texts takes alot of time of me i prefer to ask Question directly about my problem.i'd be glad if you introduce me a good and free tutorial.

thank you very much.

0 Kudos
Message 30 of 34
(864 Views)