LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to create files with write to measure.vi

Check here for a discussion about DAQmx and DAQassistant.

 

http://forums.ni.com/t5/LabVIEW/DAQAssistant-or-DAQmx/m-p/640837/highlight/true#M296105

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 11 of 77
(984 Views)

Hello,

 

First I apologize for late reply.

 

Real-Time in LabVIEW is not just one VI that gathers and analyze all the data, but the whole Real-Time architecture is little more complicated. There is our Real-Time module training, which can help you understand the implementation of Real-Time in LabVIEW:

http://zone.ni.com/devzone/cda/tut/p/id/9988#toc2

I advise you to read lessons from 1 to 5. The implementation of the Real-Time project is shown on page 62 - in time-critical loop on Real-Time target (cRIO) you gather data, then you send those data to a non-deterministic loop to analyze and send data to computer host, and on computer host is the VI, which is handling user interface communication with cRIO and computer data storage (writing to a file)

With this implementation you can really speed up the sampling rate - still the upper limit is limited to hardware that you use.

 

DAQ assistant is just the opposite as you said - for higher sampling rates it is better to use lower API, because with DAQ assistant you have some logic implemented that you don't need that could make your process slower. But for easier implementation and for new users it is appropriate to use.

 

If you will have any questions about regarding Real-Time implementation feel free to ask.

 

Best Regards,

Gregor Cerne

 

National Instruments

0 Kudos
Message 12 of 77
(972 Views)

Thanks for the link! I am reading up to slide 80, I am still confused about the details but I am starting to understand the concept of seperating deterministic and non deterministic loops.

 

I have also come across that shared variables and express VI slows down the performance. What are some alternatives to those for my application? Or is it ok if i can keep those away from the deterministic loops? Seems like my project and VIs will need a major work over........

0 Kudos
Message 13 of 77
(958 Views)

Hello,

 

There are alternatives:

 

Express VIs are high-level VIs, which are made by lower-level API. In many cases you don't need all the lower-level VIs in express functins - in this case you are just spending CPU/increasing jitter for nothing. That is why the express VIs aren't so desired in the time-critical programs, so they are replaced by lower-level APIs. It is harder to program lower-level functions, but performance increases for quite a bit. For example, DAQ-assistant can be replaced by DAQmx virtual chanel + DAQ write/read + DAQ start + DAQ clear; formula express VI can be replaced with numeric operations and so on.

 

Shared variables can slow down the process, but they can also improve it with enabled option RT FIFO - when you will read to the end of 5th Chapter it will be clear why, otherwise just ask.

 

Best Regards,

Gregor Cerne

 

National Instruments

0 Kudos
Message 14 of 77
(950 Views)

Thanks for the quick reply!

 

Just want to know whether I am on the right track, so the big picture is that I would want to run a VI on the Real Target cRIO to acquire data (time critical loop) and then somehow send the data to the other VI, which is ran on the computer to write the data acquired to text files? So essentially I will be using those DAQ tools to "acquire" the data in the first VI (on the cRIO) and send it to the other VI (using shared variables?) and use write2measure.vi (or other alternatives) to write my data into text files?

 

Thank you for your patience,  I know I should probably have finished reading the materials you sent me first before asking questions but the deadline of my project is approaching which is why I am desperate for solutions 😞

0 Kudos
Message 15 of 77
(945 Views)

Hello,

 

You are right with most things.

 

I do not recommend using DAQmx tools for acquiring data on CompactRIO - DAQmx driver are mainly made for DAQ devices, like CompactDAQ, USB-devices (NI USB-6218) - for CompactRIO please look at the example NI 9205 - Getting Started - Scan Mode.vi - here you have already separated deterministic loop with acquiring and non-deterministic loop where you still need to implement communication with VI on computer - shared variables are OK. Communication between loops is already made in this example (with shared variables with RT FIFO enabled)

 

Best Regards,

Gregor Cerne

 

National Instruments

0 Kudos
Message 16 of 77
(928 Views)

hmm can u tell me the exact location of that example please? I am using Labview 2009 I can find 9207 getting started and 9208 getting started but not 9205. Or is it the same as 9205 basic IO?

0 Kudos
Message 17 of 77
(919 Views)

Hello,

 

I see that in LabVIEW 2009 there is no nice examples - here is the example from LabVIEW 2010.

 

Best Regards,

Gregor Cerne

 

 

0 Kudos
Message 18 of 77
(854 Views)

Is it essential to seperate the deterministic and non deterministic loops into two different VI's or is it good enough as long as the tasks belong to different timed loops? Is there a way to download the ni 9205 example you suggested?

0 Kudos
Message 19 of 77
(853 Views)

thanks for the example I'll have a look now 🙂

0 Kudos
Message 20 of 77
(852 Views)