Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

glitches on Output with 6229

Hello,

I am using a NI 6229 to generate several outputs (waveforms, static signals).When I am changing output (e.g "Add Channel" or "Create Task") I get some glitches on my output. I checked the NI knowledge base and I could find some reason for this e.g switching of D/A code.
Anyhow, I have to avoid these glitches and unfortunetely the 6229 doesn't support the re-clitching function.

So, according to the KB there are two ways:

  1. You can build a deglitching circuit. The foundation of this idea is to use sample and hold circuitry to sample and hold the previous value while the DAC is settling on the current value.

    Note: The building of a deglitching circuit is not an easy task. Several schematics on how to accomplish this may be found on the Internet. National Instruments makes a variety of DAQ cards which include reglitching circuits that attempt to reduce the effects of glitches.

  2. You can build a low-pass deglitching filter to remove the high frequency components of the glitch. Depending on the frequency and nature of the output signal, the low frequency components of the glitch will not be filtered.
I would prefer the first way because our machine is already done . Like they said its not an easy task , so I would like to ask if there are some solutions or sample VIs available.

Many thanks


Message Edited by dahum on 10-01-2007 05:45 AM

0 Kudos
Message 1 of 7
(3,581 Views)
dahum,

The glitching mentioned in the knowledgebase article refers to glitches that occur when writing values to the AO channel and should not affect the card when you call Add Channel or Create Task.  You mentioned that the glitches seemed to occur when calling these VIs.  Would it be possible for you to verify if this is really the case by removing all other code from your application and only calling the Add Channel or Create Task?  If the glitch is related to these calls, I think it is unrelated to the article in question and is unexpected.  If the glitch is not related to these calls you can further verify whether the glitch is caused by the factors discussed in the article by monitoring where the glitches occur.  "Glitch energy" typically presents itself at the midscale transition when the voltage crosses 0V (for example the voltage goes from 1 to -1 or vice versa).

If the glitching you are seeing is related to "glitch energy" then both solutions mentioned below could be suitable.  However, both of these are hardware implementations that will require custom signal conditioning and can not be implemented in software.  Depending on the application different solutions may be more appealing.  For example if you intend on only generating DC values a simple low pass filter may be more attactive since it can be very simple (just a resistor and capacitor).  If you are generating higher frequency signals the sample and hold circuit may be more suitable.  You can find several examples of these types of circuits at:

http://www.maxim-ic.com/appnotes.cfm/an_pk/583

Please let me know if you have any additional questions.  If you still have questions about which method may be better feel free to post more about your application.  Specifically it would be nice to know what kinds of signals you are generating and how these generated signals are being used.

Regards,

Neil Stoddard
Multifunction DAQ
Product Support Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,571 Views)
Thanks for your answer.

You are right, after some time of searching I came to same result. My glitches are not caused by the "glitches energy". It appears when I add a channel and the break is around 5ms to ground.

Let me verify my application:

I give a static output of 2.5V for some seconds, after that I need to switch to dynamic signal, lets say a sinus wave. To get this I need to "destroy" the old task, "Create" a new one and "Add"  a channel.
In this time while switching I got the glitch (maybe I shouldn't call it  switch). So it is a kind of software problem.

I have 2 main issues:
- What cause this break of 5 ms (on which step)?
- How to avoid this break?

Is there a way to overwrite the values and do not use the "destroy-create-add" sequence.

Thanks
0 Kudos
Message 3 of 7
(3,565 Views)
dahum,

Let me see if I completely understand your application.  Basically from what I understand you would like to generate a DC value followed by some dynamic signal.  You have attempted to do this by creating one task for the DC output and another task for the dynamic signal.  However, when you stop the DC output and start the dynamic signal you see a 5 ms glitch to 0V?  Is this correct?  What would be ideal behavior, that the channel remains at the DC value until the dynamic signal begins, or that the channel goes to some specific voltage between the DC output and the dynamic signal output?  How are you initiating the change between the DC value output and the dynamic output?  Do you use a software button on your front panel, or do you use some external digital signal, or is the timing set beforehand?

If know beforehand how long you need to generate the static 2.5 V signal you can create a buffer in software that contains this DC value for some specific number of samples and then contains the dynamic signal.  The DC signal could be generated using the same update rate as the dynamic signal you just write a number of samples that have the same value (for example 2.5, 2.5, 2.5, 2.5, etc.).

If you need to dynamically set when the waveform changes from DC value to the dynamic signal you can simply write new values to the buffer instead of stopping and restarting the task but the new values will not show up until the old values are finished generating (to clear out the FIFO).

I look forward to further understanding your application

Regards,

Neil S.
Multifunction DAQ
Product Support Engineer
National Instruments




0 Kudos
Message 4 of 7
(3,561 Views)
"Let me see if I completely understand your application.  Basically from what I understand you would like to generate a DC value followed by some dynamic signal.  You have attempted to do this by creating one task for the DC output and another task for the dynamic signal.  However, when you stop the DC output and start the dynamic signal you see a 5 ms glitch to 0V?  Is this correct?  "

Right, this is exactly what I mean.


"What would be ideal behavior, that the channel remains at the DC value until the dynamic signal begins, or that the channel goes to some specific voltage between the DC output and the dynamic signal output? "
The ideal behaviour would that the signal continues without going to ground. That means my e.g 2.5 V DC turns to a sinus wave with the x-axis at 2.5V.


"How are you initiating the change between the DC value output and the dynamic output?  Do you use a software button on your front panel, or do you use some external digital signal, or is the timing set beforehand?"

The outputs are completely software controlled.


"If know beforehand how long you need to generate the static 2.5 V signal you can create a buffer in software that contains this DC value for some specific number of samples and then contains the dynamic signal.  The DC signal could be generated using the same update rate as the dynamic signal you just write a number of samples that have the same value (for example 2.5, 2.5, 2.5, 2.5, etc.). "
This 2.5VDC was just an example. I also need to change after dynamic to static and so on. I am just wondering why I alway get these breaks. I don't know how long will be the signals-the are event controlled caused by some calculations or similes.


"If you need to dynamically set when the waveform changes from DC value to the dynamic signal you can simply write new values to the buffer instead of stopping and restarting the task but the new values will not show up until the old values are finished generating (to clear out the FIFO)."

That means the new values will start in the back and shown up as soon as the FIFO is empty with the old values or will they start with a delay at the first value? In the last case I would get displacements.
So far I have no way to overwrite the old values beacause of the FIFO and the breaks cannot be removed in a smooth way.

I need to know something generally. Is that a known "problem" or behaviour to get these breaks while changing tasks-or do I do something wrong? It should be possible to avoid these "glitches".

Message Edited by dahum on 10-02-2007 02:00 AM

0 Kudos
Message 5 of 7
(3,547 Views)
dahum,

From what I am understanding you are seeing strange behavior.  In normal operation the 6229 will continue to output the last value updated to the AO channel until you either:
  1. Reset the device
  2. Write a new value
If you do a software write of one 2.5 V sample, for example, the AO channel will remain at 2.5 V unless you reset the device or write something else to that channel.  Would it be possible for you to post your code to the forum to show what you are currently doing?

Regards,

Neil S.
0 Kudos
Message 6 of 7
(3,512 Views)
We tried to change our software in the last days. So end of the week I will know more.

But to answer the last thread:
We don't make a reset of the device. As I said we destroy the old task, create a new and write a new value. Here we get our 5ms break.
So, at your last comment you said the card is able to give me a continous output while changing the value? If that is right we have a software error.



I will post our results as soon as I know more.


Thanks for the support
0 Kudos
Message 7 of 7
(3,483 Views)