LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to create files with write to measure.vi

looks like I'll need to convert this 2010 file down to a 2009 version before i can access the files, just posted it to the downvert post hopefully it wont take too long 😞

0 Kudos
Message 21 of 77
(714 Views)

I have made a preliminary attempt on splitting the two tasks into two seperate loops. I have put the write to measure task into a while loop. However it seems like the while loop is not running at all. Can you pelase have a quick check and tell me whether I am on the right track? Thanks a lot!

0 Kudos
Message 22 of 77
(706 Views)

Sorry there was an error in the previous project regarding the file path of one of the subVI, Ill re upload the corrected version.

 

0 Kudos
Message 23 of 77
(700 Views)

Sorry there was an error in the previous project regarding the file path of one of the subVI, Ill re upload the corrected version.

 

0 Kudos
Message 24 of 77
(699 Views)

Is it necessary to write the data into an array before writing into a shared variable? Is that part of the aquiring data stage? Because I am afraid that writing the twenty input signal into an array will modify the format of the text file output

0 Kudos
Message 25 of 77
(681 Views)

still seems like nothing is happening in the while loop when i run the program 😞

 

It would be greatly appreciated if someone can check my project and point out any major mistakes i have made. Thanks a lot!

 

(DAQAI20(test4).vi is the latest VI i have created)

0 Kudos
Message 26 of 77
(670 Views)

Hello,

 

The loop acrhitecture is almost right -  only problem is that you have wire connected from timed loop to while loop, meaning while loop will executes after the timed loop ends. You need to delete that wire and add timestamp to the array that you are sending, so the loops will executed paralel

 

But there are still some things that needs to be corrected:

 - this vi should be on the cRIO - but without any terminals (indicators/controls) and without exe1.vi, which write to file

 - instead of exe1.vi there should be network shared variable, is which you save the data you acquire in timed loop

 - you should make VI on the compouter, where you read array from network shared variable and then you can save array to a file and show the array on front panel indicators (you need to take each one of the elements seperately - the fastest way is to convert Array Into Cluster, and then unbundle Cluster; to make this work you need to change Cluster size on Array into Cluster function - just right-click on function and you will see option)

You can make another network shared variable for communicating when Stop button is pressed.

 

Putting all the data is almost necessary for faster connection - you don't need to send one data at the time but more data at once.

 

Best Regards,

Gregor Cerne

 

National Instruments

0 Kudos
Message 27 of 77
(663 Views)

Thanks for the reply!

I have a few Qs regarding your suggestions.

1) How can i exactly add a timestamp onto the array when the time string is in string format and the array is in doubles?

 

2) the while loop should be in a seperate VI then? If exe.vi should not be in the VI which runs on the cRIO.

 

3) Is it possible to keep the same file format as before? I have attached one the sample file in I have always been producing using the old,inefficient approach. Its called test001.lvm.

test001(new).lvm is the one I am producing now using the VI I have sent you and the number of channels has gone from 20 to 1 and the data is a whole lot different which I hope i can figure out the reason soon. 😞

 

4) Have I achieved the acquiring data purpose in the timed loop?

 

 

0 Kudos
Message 28 of 77
(657 Views)

SOrry i think Q4) is confusing. What I want to ask is that I have assigned a shared variable (called variable1), doesnt it achieve the pupose of the network variable you suggested already?

0 Kudos
Message 29 of 77
(646 Views)

Hello,

 

1) Sorry, just figure it out the problem. The workaround is to enable timestamping at Variable1 (in project explorer and properties), and then right click on the Variable1 in the while loop and choose timestamp>show. This way you will have the time stamp; to send to the computer VI I recommend another buffered network shared variable.

 

2) No, while loop and timed loop should be in the same VI, and this VI need to be in on Real-Time target (cRIO).

 

3) Yes it is possible, you need to is to double-click on function to DDT (function which transfer array into dynamic data / blue wire) and choose 1D scalars - multiple channels

 

4) Yes - but you for comunication with computer you need to make another one, disable RT FIFO and enable buffering.

 

Best Regards,

Gregor Cerne

 

National Instruments

 

 

 

0 Kudos
Message 30 of 77
(636 Views)