LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i link data from a strain gage vi to an excel sheet i all ready have both on my block diagram what can i do to link them. thanks

Thanks brian
 
i have redone the code and the error is gone.
 
but i have a new one i am using the writing to excel like mike showed in his reply
but when i change to the 2D output i get no graph on the front panel like i do when it is a 1D
and when i run the program the data stops short of going out to the spread sheet.
 
can you help thanks  
0 Kudos
Message 11 of 22
(1,352 Views)

Loni,

Have you wired up your block diagram like the example that Mike posted?  The document with the picture you sent had many broken wires and it looks like they were not connected properly.  Try to create the same connections that Mike did in his example.

Brian Coalson

Software Engineer
National Instruments
Message 12 of 22
(1,334 Views)
Hi brian thanks for the reply
 
the broken wires are from the way i copyed the block
 
yes i have wirerd it the way mike shows on the example but i still do not get data to the excel sheet
take a look at the attached
 
thanks again
0 Kudos
Message 13 of 22
(1,326 Views)
The other half of my original comment is that the code for writing the data to the spreadsheet has to be moved inside the acquisition loop. Otherwise all you will get written to the file is the last data sample when you stop the acquisition. As I said before, the point of the code was to show you how to connect 2D data to the Excel write VI.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 14 of 22
(1,322 Views)
Mike i think tried that i might not be putting it in the right loop
would please take a look at the attachment and let me know witch is the right one
i sorroy for bing such a pain i am new to labview.
 
if can i thank you very much.
0 Kudos
Message 15 of 22
(1,315 Views)
No worries about being a pain. We all have to learn sometime...

I have attached a reworked version of your code. A couple things to notice: First, note the usage of shift registers for passing the reference and error clusters through the FOR loops. These are necessary because it is possible for a FOR loop to execute zero time. In this case the error cluster and reference coming out of the loop would be undefined - which is probibly why you were seeing no data being written. Second, I have added a VI (also attached) that merges the two error clusters in the VI back into one.

If you have any specific questions about why something in the code is the way it is, just hollar...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 16 of 22
(1,305 Views)

Hi Mike,

Thank you for all your help with this one.

Mike I went to run the code and noticed that the arrow was broken so i checked it to

See where the error was and it showed that there was an error at the vi that shows the

question mark it read that the cont Acq strain samples (was disconnected to prevent recursion.

Do I need to put the error fork stacker vi on the code block

please let me know thanks loni

 

0 Kudos
Message 17 of 22
(1,288 Views)
The VI that I sent back should be a replacement for the one that you posted. All I did was open the VI you posted, make the modifications and reposted it with a different name. I don't know where the recursion error comes from unless I inadvertently picked a name for my modified version that is the same as one that already existed.

The purpose of the error fork stacker is to combine two separate error cluster chains back into one so you should use it anywhere that is an issue.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 18 of 22
(1,284 Views)
Hi Mike,
 
Mike I have replaced the error handler that I told you about with a new 
simple error handler, and the code now works I am gitting data to the spread sheet
also removed the wire coming out of the end of the handler that was going down to the
last loop when I had this hooked up it gave me an error so I removed it that's when it strated to work.
 
Mike when I changed the DAQmx read from waveform to 2D DBL the graph shows no waveform
is there any way I can get this graph to show the waveform or can I add another graph.
 
And as always thank you very much for your help
 
 
0 Kudos
Message 19 of 22
(1,266 Views)
The graph that's there should be displaying the output of each acquisition, but it sounds like you have made futher modifications. Can you repost the code that you are using right now? Also, on the code I last sent you, I just noticed that the X axis is not set to autoscale. Make sure autoscaling is turned on for both the X and Y axis.

Mike...

Message Edited by mikeporter on 07-06-2007 08:52 AM


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 20 of 22
(1,266 Views)