LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

analog output range change (PXI 4461) & continous generation?

Is it possible to change the range of analogue output (PXI 4461) without stopping continuous generation? Does the task have to be stopped or maybe just transferred to a different state? Can anybody help me with that?

0 Kudos
Message 1 of 12
(4,197 Views)

Hi Tomkut,

I hope you are well.  Thank you for your message. It is very interesting.  I have had a look at what you are trying to do with the PXI 4461 in changing the range of the analogue output whilst in continuous generation mode, but I do not think that this is possible as you have to stop the task before the range can be changed.  I have tried transfering to a different state but it only works when I do an implicit state trasition to the unreserved state, but I do not think that this would be of any real benifit and it would probably be better to just stop the task.

I am sorry that I could not be more help with this but if you have any questions feel free to let me know and I will do my best to resolve them.  Good luck with your application.

Kind regards,

Prashant M
Applications Engineer
NI UK & Ireland

 

0 Kudos
Message 2 of 12
(4,179 Views)

Hi Prashant,

I do have some other questions, shall I continue in that topic?

Thank you

Tom
0 Kudos
Message 3 of 12
(4,173 Views)

Hi Tom,

Thanks for the message.  If your questions are related to this topic then you can post them on this message, however, if you have some questions that are related to other topics, I think it would be best to post them as a new subject.

I hope this helps.

Thanks very much.

Kind regards,

Prashant M
Applications Engineer
NI UK & Ireland

0 Kudos
Message 4 of 12
(4,169 Views)
My questions are related to that topic, but it's more complex problem I guess. Anyway I can't find clear explanation to:

1)       I want to generate sine waveform, 50Hz, and depending on the input change it’s parameters (amplitude) not every cycle though, may happen after 2000 cycles. Shall I use regeneration mode? I though it might be a good idea, since the computer doesn’t have to generate all the time the same sine and write into…  But I also read about glitching problems and long time it takes to generate changed waveform (although it seems stupid to me, cause that should be solved with buffer parameters) don’t know which way to go, usually it’s advised on NI.com to disable regeneration and produce the samples/cycle every iteration (but I don’t understand here many things as well).

2)       If you generate continuously (sine waveform, 50Hz, non-regeneration) and want to get new cycle every loop, do I need to specially configure buffer (either user or onboard)? I read somewhere in help that buffer is as big as first portion of samples sent to DAQmxWrite.VI (so it’s gonna be 1000 S, one cycle in my example, is it user one or onboard). What happens if loop iterates faster than generation, what happens with samples that haven’t been generated yet? Does the buffer grow (are the samples in a queue)? (I don’t want that, cause than I’ll have to wait X cycles to get changed waveform). Does it rewrite all the time old data? (wouldn’t it be sensible to slow down the loop, so that producing useless data doesn’t occupy computer?). What if inside my generation loop are many other VIs, calculations, processes and I don’t want to slow down that loop? What if the other processes will take so much that waveform won’t be generated on time (whereas regeneration is off).

Regeneration seems to me the smartest solution, but anywhere I was reading about continues generation, it was rather advised to turn off regeneration, why?? (glitching problems, delay in generation of updated waveform? that should be solved with buffer options I would think).

Tom
0 Kudos
Message 5 of 12
(4,165 Views)

Hi Tom,

Thanks for the message.  I have had a look at this and for the first part of your message I think the best option is for you not to use regeneration as this will allow you to write to the buffer each time on the fly as you are constantly writing data to the buffer.   I have attached an example VI so that you can see how this is done.  From your previous message you mentioned that you wanted to change the amplitude so in this example VI I have put the amplitude inside the while loop to allow this.   

If you use regeneration, then you would have to stop the task before you write back onto the buffer and it is generally used if you don’t want to change frequency or amplitude.

For the second part of your message, the drivers will actually take care of most of the things that you had concerns about so you don’t need to worry too much about it.

For the last part, where you are concerned about the effect of lots of Vi’s, processes and calculations within the loop, you are correct as lots of processes will definitely slow the loop down and what is suggest in this case is that you use the “Producer and Consumer Loop”.  In the “Producer and Consumer Loop” the top loop should have all of the time critical functions and the rest should be in the bottom loop and you pass data between the loops via queues. For more information on the “Producer and Consumer Loop” I have posted a link for you below:

http://zone.ni.com/devzone/cda/tut/p/id/3023

I hope this helps with your application and let me know how you get on.

Kind regards,

Prashant M
Applications Engineer
NI UK & Ireland

Message 6 of 12
(4,136 Views)
Hi all,
I've been trying to use the continuos generation mode(regeneration disabled)
with  no success. My goal is to be able to modify some parameters of the
continuos generated signal while the VI is running.
In particular I've tried to execute the example proposed
in this thread (and also in the LV help)  for dynamically changing the amplitude of the generated signal.
The problem is that, when the VI is running, the amplitude of the generated signal
can be changed only in the LV environment; the real output of the hardware module (an 6120 PXI module)
remains unchanged.

Finite generation mode works OK.
Could you have any idea to help me?

Regards,
giohdl
0 Kudos
Message 7 of 12
(4,097 Views)
Hi giohdl

try to set the buffer properties as on the attached picture   :))
Message 8 of 12
(4,046 Views)
Tomkut - THANK YOU! Why is it that DAQ programming is so non-intuitive in Labview?  The Express blocks are great if they suite your needs, but otherwise its frusterating.  It should all be changed to make the language more accessible.
0 Kudos
Message 9 of 12
(3,729 Views)

BenYL, what are you having an issue with?

I find LabVIEW to be very intuitive, especially in the area of data aquisition, which is what LabVIEW dominates other languages at.

Are you having a problem with some of your code?

Cory K
0 Kudos
Message 10 of 12
(3,724 Views)