LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with LV Real Time

hi everyone, I have few things to ask about Labview Real Time.

 

1. after searching and reading, I've come into conclusion: I need to work under Labview RT to have a while loop to iterate at 1MHz speed, is it correct?

2. how do I know if LV-RT is installed in my PC? I've seen my MAX, I saw so many softwares installed, but I didn't see any RT installed, is it NI-RIO?

3. in my function palette, I have Real Time VI's. But I can't put simply this wait.png in a while loop and put 1 us as wait time. 

 

I have PXI chassis PXIe-1082, and I want to generate serial digital data using PXIe 6544.

And I need to write my data faster than 1 ms (like 100us) . How to do this?

 

My PC specs are Intel 2x 2,6GHz; RAM 2GB; Windows 7, 32 bit; my Labview version is 2010.

 

LV.png

 

Any helps are appreciated.

Regards,

Yan.


0 Kudos
Message 1 of 15
(3,474 Views)

First: LabVIEW Real-Time is not the same as the LabVIEW Run-Time Engine.  The former lets you run your LabVIEW code deterministically.  The latter lets you run compiled LabVIEW applications without the full development environment.

 

LabVIEW Real-Time is a separate, add-on toolkit.  It appears that you do not have it installed.  LabVIEW Real-Time runs on a dedicated operating system; normally you would run it on a separate computer, although if I'm not mistaken there is a "hypervisor" that will let you run real-time and Windows concurrently on one PC.  Are you running Windows on your PXIe chassis, or are you referring to some other computer when you list the PC specs?

 

Does your code need to run a 1Mhz loop, or do you simply need to output data at that rate?  It appears that your 6544 is capable of producing a high-speed digital waveform.  You can load a buffer with the entire waveform (or a section of it) and let your card handle the timing, so that your code can run slower but generate multiple data points per loop iteration.

0 Kudos
Message 2 of 15
(3,460 Views)

hi Nathand, thanks for replying.

 

Actually I just need to output my data at variable clock rate (Hz ~ kHz ~ MHz), which controllable by the user. And I thought I can use while loop to run faster than 1ms, but it doesn't.

 

Another thing, I need to have sample rate 40MHz on my 6544. I'm generating 14bit data in serial way using 1 channel only.

And I've tried to put zeros behind my data to act as delay, but to get delay in range kHz, which means with 40MHz clock rate, I need to have 40 MS data to get delay 1 second. But the card doesn't allow me to generate more than 4MS per buffer.

 

Maybe an example would be a great help for me.

 

Regards,

Yan.


0 Kudos
Message 3 of 15
(3,450 Views)

Sorry I can't provide an example, I don't have any experience with that particular hardware.  I took a quick look at the manual, though, and it looks like it's a sophisticated device with scripting that can generate waveforms for you - you should read through the manual and determine if that's appropriate for you.  You may also want to call your local NI representative for assistance.

 

Also, I don't quite understand your comments about needing 40MS data.  What are you trying to abbreviate with "MS"?  You don't need to fill the buffer with an entire second of data at once - your LabVIEW code can easily maintain a loop cycle faster than 1hz.  So to get a 1s delay you might have a loop running at 10hz and fill the buffer with 100ms of data 10 times.  However I think you should investigate what your device can do, there may be a better solution involving triggers.

0 Kudos
Message 4 of 15
(3,439 Views)

hi,

 

what I meant with MS is Mega Samples. And my PC specs is for the computer that I'm using which connected to pxie 1082 through pcie 8371 controller.


And I want to be able to write data with controllable rate (from range microsec. ~ sec.).

Since while loop can't execute faster than 1ms (on windows), then I thought I should use LV realtime.

 

Can you please explain more about "...let your card handle the timing..."?

 

Regards,

Yan.


0 Kudos
Message 5 of 15
(3,432 Views)

Mystogan wrote:

what I meant with MS is Mega Samples. And my PC specs is for the computer that I'm using which connected to pxie 1082 through pcie 8371 controller.


It appears that the 1082 has an onboard controller - is this the case for your system?  Are you using that on-board controller?  It is capable of running LabVIEW Real-Time, although you would need the Real-Time toolkit.


@Mystogan wrote:
And I want to be able to write data with controllable rate (from range microsec. ~ sec.).

Since while loop can't execute faster than 1ms (on windows), then I thought I should use LV realtime.

 

Can you please explain more about "...let your card handle the timing..."?


I'm still confused as to why you need a loop faster than 1ms.  Are you trying to update your output on every single iteration of the loop?  If you just need to generate a waveform, you should, as mentioned before, generate multiple points and write them to the card in a batch.  The board will then output the points in that waveform at the rate that you specify.  That's what I meant by "let the card handle the timing."

 

Have you looked at the manual and help for your device, and the examples that are provided with LabVIEW?  Look for the HS-DIO (High-Speed Digital I/O) examples.

0 Kudos
Message 6 of 15
(3,428 Views)

@nathand wrote:

It appears that the 1082 has an onboard controller - is this the case for your system?  Are you using that on-board controller?  It is capable of running LabVIEW Real-Time, although you would need the Real-Time toolkit.

I'm not sure what you mean with that on board controller, and how to check it whether I have it or not.

I'm still confused as to why you need a loop faster than 1ms.  Are you trying to update your output on every single iteration of the loop?  If you just need to generate a waveform, you should, as mentioned before, generate multiple points and write them to the card in a batch.  The board will then output the points in that waveform at the rate that you specify.  That's what I meant by "let the card handle the timing."

 

Have you looked at the manual and help for your device, and the examples that are provided with LabVIEW?  Look for the HS-DIO (High-Speed Digital I/O) examples.


yes, I'm trying to update my output in every single iteration of the loop, because my card can't handle too much data at once. Just for example, I'm generating ramp up (with 8 bit or 256steps), hold, ramp down (with 8 bit or 256steps)with 40MHz rate.

To generate each data I should be able to control the delay between them: for one case I might have 256steps ramp generated in 1ms, and in other case I might be generating 256steps in 10sec. I've tried once generating all datas and array of zeros as delay between actual step and the next step, but to get more delay, it means I would build more array of zeros. And this card has limit to generate about 4M samples, which is not enough to build 10 sec wave with 25ns (1/40MHz) LSB.

 

Regards,

Yan.

0 Kudos
Message 7 of 15
(3,396 Views)

Is this the real time module?

 

RealTime.png

 

Regards,

Yan.

0 Kudos
Message 8 of 15
(3,393 Views)

@Mystogan wrote:

yes, I'm trying to update my output in every single iteration of the loop, because my card can't handle too much data at once. Just for example, I'm generating ramp up (with 8 bit or 256steps), hold, ramp down (with 8 bit or 256steps)with 40MHz rate.

To generate each data I should be able to control the delay between them: for one case I might have 256steps ramp generated in 1ms, and in other case I might be generating 256steps in 10sec. I've tried once generating all datas and array of zeros as delay between actual step and the next step, but to get more delay, it means I would build more array of zeros. And this card has limit to generate about 4M samples, which is not enough to build 10 sec wave with 25ns (1/40MHz) LSB.


You seem to be treating it as though the only two options are to generate the entire waveform at once, or to generate one point at a time.  Again, I don't have access to your hardware so I'm not certain of this, but I think you can generate the waveforms in segments of 4M samples, and even without RT your code should be able to run fast enough to supply a new segment in the time that it takes to write the previous one.

 

If you absolutely need to update the output every iteration of a 25ns loop instead of generating the waveform in advance, use an FPGA card.

 

Your card has some advanced scripting capabilities - have you looked through the examples?  For example, it appears you can download multiple waveforms, the write and run a script that excutes a sequence of waveforms.  This would also let you get around the size limitation of a single waveform.

 

If you have the Real-Time toolkit, you will see the "Real-Time" palette when you look at the block diagram palettes.  It will also show up in Measurement and Automation Explorer under Software if you expand LabVIEW (in your case, LabVIEW 2010 f2).

 

How did you pick this particular hardware for your application?

0 Kudos
Message 9 of 15
(3,381 Views)

hi nathand, thanks for reply 🙂

 

I'm actually doing a project in university, where my supervisor has bought the devices for his project and I just need to search in internet & forum of how to make it work. And too bad he doesnt really know how to program Labview, so I keep asking somewhere else like in forum and emailing NI for support.

I've seen the examples, and I have generated my waveform using 40MHz clock rate, for each data, I'm writing it with an array of 40 bits boolean which takes 40 x 25 ns = 1us for one data generation.

So, simply said, I'm using buffer of 40 bits boolean. Then I'm using the index of FOR loop as a counter, I treat this counter as the step of the ramp, then I convert into digital waveform.

 

So, if I'm generating without any quotient&remainder block function, each steps would be generated after every 1us of time elapsed.

And if I'm (for example) using 10 with quotient&remainder, each steps would be generated after every 10us of time elapsed. 

 

With that trick, I should be able to change the quotient input (lets say T1) as big as I want (as delay) between each generation, with the fastest rate = 1us, right?

 

I'm saving the waveform into TDMS file and checked, that the generation is fine. But I just got a feeling, with using FOR loop, it takes time to generate my waveforms.

 

I've tried to change T1 into 1000, which means, it should generate each step in every 1000 x 1us = 1ms; and generation of 256 steps should be done in 256 ms, right? I've checked the TDMS and it looks fine, but just, the duration took longer than it should be. I think it takes like 256ms per steps instead of 256ms for all steps. I don't know, I think I shouldn't use FOR loop either.

 

Regards,

Yan.

0 Kudos
Message 10 of 15
(3,371 Views)