Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

SCXI-1126: Cannot set a trigger on a positive-voltage waveform.

Hello,

I am using the NI SCXI-1126 module in order to measure frequency.
The waveform is a DC square wave, and its range (amplitude) is 0-4.5 volts.

When I tried to set the trigger to anything other than 0 while using MAX, the frequency would not be read at all.
On another hand, if the applied squarewave is offset so that it is centered around 0V (say, -2 to +2 volts), the trigger can be set to any desirable voltage within the range, and the frequency is read without problems.

My question is why can I not set the trigger to a positive value if the entire signal is in the positive-voltage range?

Thanks

Regards,
Denys
0 Kudos
Message 1 of 6
(4,333 Views)

Hi Denys,

If I understand correctly, you have a square wave input signal and you are using the SCXI-1126 module to measure the frequency of. You are setting up and running a task in MAX, and unless you add a negative offset to center the square wave about 0, you are unable to measure frequency. Is this correct?

1)     What are you trying to trigger? Are you trying to trigger when you want one frequency measurement- as in on demand acquisition? Or when to begin continuous measurement?

2)     What type of trigger did you select?

3)     When the square wave is ranging from 0-4.5 V, can you measure frequency without setting a trigger? Just setting the level and hysteresis values and running the task?

4)     To what have you set the Threshold Level and Hysteresis values in your task?

5)     What DAQ card is your SCXI chassis cabled to?

 

Understanding the task set up will help to pinpoint the problem and also allow me to try and reproduce this behavior.

Regards, Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 2 of 6
(4,320 Views)
Dear Mallori,

You have a correct understanding of my problem. Pardon my vagueness, but when I said I cannot trigger a reading, I meant I cannot set the level and hysteresis values so that I get a proper reading of the frequency.

It doesn't matter whether I do an on-demand or a continuous reading (a single reading doesn't change the results either).

Whenever I set the level to anything other than zero, I get an error saying "error -200223 occured at daqmxcfg_DAZmx Start Task.vi..."
Among the possible reasons is the fact that hysteresis - level has to be between -0.5 and 4.48. However, I'm making sure that's true when setting the level.

When I offset the squarewave to center it at 0V, level and hysteresis set to 0 seem to trigger (read) the frequency properly.

The SCXI-1001 chassis is cabled to the PCI-6071E DAQ card.

Also, this happens even before I set up a task or anything like that. I am simply testing the 1126 module by going to "test panels" from the Devices and Interfaces branch of MAX.

Hope this clears up my issue.

Regards, Denys

0 Kudos
Message 3 of 6
(4,312 Views)

Hi Denys,

Looking up that error code in LabVIEW, I see that it refers back to page 1-3 or page 10 of 61 of the User Manual. However, I noticed that in the manual, it says that it is threshold level minus hysteresis that has to be between -0.5 and 4.48. Perhaps if you tried this range instead of hysteresis minus level.

I would also suggest trying to set up a task in MAX as described on page 28 and 29 instead of running a test panel. This might allow you set the levels and run without error.

Have you tried changing the channel input on your card to eliminate a hardware failiure?

Lastly, what had you set as the max input limit frequency?

Regards, Mallori M.
Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 4 of 6
(4,292 Views)
Indeed, I tried everything you suggested. The reason I went to running the test panel is because the task wasn't outputting the correct data, so went to the test panel to try to solve the problem at its source.

I tried various values for level and hysteresis, and when level is set to anything other than 0, I receive the above mentioned error. And when it is set to 0, the frequency is still not being read.
The channel input has been changed, and we even tried moving the module to a different chassis, so a hardware failure is certainly ruled out. In fact, the module (and the created tasks) works perfectly well when the waveform is centered around 0V. My coworkers can work with that for the time being, but they would like to be able to work with a waveform in the 0-4.5 V range as well, which is why I posted this question.


To sum it up, MAX is only happy with me setting the level to 0. So, when the waveform notably passes through 0V, the frequency is read OK since level 0 is desirable. However, when the waveform does not pass through 0V (eg, 0-4.5V), and the level needs to be changed to some positive value which is not 0 to trigger properly, I get an error and cannot read the frequency.
Hope I'm not being too verbose in stating my issue.

Regards,
Denys
0 Kudos
Message 5 of 6
(4,286 Views)

Hi Denys,

After doing some research, I have a found a number of older corrective action requests (CARs) where this same error was occurring. However, this was a problem with an older DAQmx version. What version of the DAQmx driver are you working with? If you are using DAQmx version 7.2 or a similarly older one, I would suggest upgrading to the newest version of the driver.

Otherwise, this seems to be mostly a software issue. If you do have the most recent version of the DAQmx driver, I might also suggest trying a repair. This can be done by opening the control panel>> Add or Remove Programs>> National Instruments>> NI-DAQmx>> Repair.

Regards, Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 6 of 6
(4,241 Views)