Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

SCXI incorrect measurement

I have the following NI hardware:

SCXI-1000
SCXI-1122
SCXI-1322

With these, I am trying to measure strain. I do not have LabView, so I am using MATLAB and SignalExpress.

When I start a measurement I get values that constantly, but slowly, increase or decrease. This happens whether I use SignalExpress or MATLAB. Then I stop the measurement and switch to the other software. Upon starting the measurement, I hear a 'click' sound, like a switch or a relay and I get a correct measurement. If I stop it and switch back to the previous software, I can still get a good measurement. Also, once I get the 'click', I can stop/start measurements and get correct results as long as I don't turn off the SCXI.

If I turn the SCXI off and back on I have to do these again.


What I am trying to ask is why would the first software not be able to turn on the switch?

I cannot find any logical explanation why this would happen. Any help will be greatly appreciated.

0 Kudos
Message 1 of 13
(5,378 Views)

Hello baycan,

 

I have a couple of questions in order to explain the behavior you are seeing.

 

  1. When you start the measurement could you describe the signal you are getting (a screen shot would be helpful to analyze what is going on)? Is the signal in the range you expected?
  2. When you begin to take a measurement using signal express could you please describe your process of doing so ( post a screen shot of your code)? Do you get the same result (a signal that decreases or increases) when you try to take a measurement in Measurement & Automation Explorer?
  3. How many sensors are you using and what channels are they connected to?  

Regards,

 

Izzy O.

Applications Engineer

National Instruments 

0 Kudos
Message 2 of 13
(5,344 Views)

Hi Izzy,

 

I decided to post voltage readings instead of strain to make things simpler. Also, I found out that Measurement & Automation Explorer does the same thing as MATLAB does. If I run it first, I get incorrect readings. If I run it after SignalExpress, the reading is correct.

Here is the measurement after I turned on the device. I should mention that I was measuring 2.6 mV with a multimeter during this measurement.

scxi_decreasing.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Then I ran Measurement & Automation Explorer and heard the click and the readings were correct. After stopping Measurement & Automation Explorer, I ran SignalExpress. Here is the measurement I got:

scxi_constant.PNG

 

The same thing happens if I run them in reverse order.

I was using 4 strain gages connected in Full Bridge 1 configuration, since I am measuring voltage it does not matter anymore. Just to make sure I have not missed anything, I also tried with channel 1 and another voltage source. The results were the same. I will update once I try with other channels.

 

I could not understand what you meant by SignalExpress code. I am quite new to NI software and all I did was to create a new project and select analog voltage input and my channel. I am using only channel 2.

 

Thanks.

0 Kudos
Message 3 of 13
(5,335 Views)

What I meant was the right hand side of your Signal Express Code but the information you posted gave me quite enough information. I will be attempting to recreate the issue by setting up your hardware and seeing if I get the same behavior. I will let you know the results of my test. Also, please let me know if this behavior is occurring using different channels on your device as well. 

 

Regards,

 

Izzy O.

Applications Engineer

National Instruments 

 

0 Kudos
Message 4 of 13
(5,305 Views)

Hi Izzy,

 

Thanks for going into so much trouble.

 

I tested all the channels. All of them, except for channel 0, behave the same way. Channel 0 reads half the supplied voltage at first. Then as usual, when I try to read with the other software, it reads the correct value. This issue is getting weirder and weirder.

 

By the way, Measurement & Automation Explorer did not always work. When it didn't, I reset the computer and it started working again. Instead of resetting the computer 15 times I decided to use MATLAB.

 

Thank you very much,

baycan

0 Kudos
Message 5 of 13
(5,294 Views)

Hello Baycan, 

 

I set up the hardware and could not recreate the same issue you experienced, and at this point cannot discern what would cause the behavior you are seeing from switching over from one software environment to another. Just to troubleshoot the issue you are experiencing and to clarify your previous statement I have a couple of questions and recommendations.

 

  1. You mentioned that using Measurement & Automation Explorer (MAX) did not always work could you expand on that? Was going from Signal Express to MAX not always working or the other way around. Was MAX still giving incorrect measurements when you switched to it from Signal Express?
  2. When you first start acquiring data via Signal Express or MAX and it give you an incorrect measurement, could you please go into MAX and reset the device then attempt to use the same software to acquire data and please let me know the accuracy of your acquisition.
  3. Also, could you add all of your channels into one task in MAX or Signal Express? This can be accomplished during the setup of your acquisition by selecting all the channels you are measuring (shown below). Then attempt to acquire a signal from your strain gauges.

 Capture1.JPG

 

I am suggesting step 2 & 3 in order to force the relay to switch.  There might be an issue with the relay’s having worn down and taking a long time to respond to a signal to close, or the system might need a second reset (which the second software supplies) in order to acquire appropriate measurements. Please let me know the results of these steps.    

 

Regards,

 

Izzy O.

Applications Engineer

National Instruments 

0 Kudos
Message 6 of 13
(5,269 Views)

Hello Izzy,

 

Sorry it took me a while to write back.

 

I tried to recreate the problem I had with MAX last time but failed. It works okay now.

 

Resetting the device from MAX as you suggested in (2) worked. There was no need for another software to get a good measurement after resetting from MAX.

 

When I tried to take samples from all the channels, there was a horrible buzzing sound. I had not tried taking measurements from multiple channels before. The sampling rate was 6.25 and samples to read was 25. Then I decided to sample from only 2 channels (2 and 13) and drop the sample rate lower. Even at 1 Hz and 10 samples to read buzzing continued, though it was much less terrifying. The measurements were correct. Turning the device off and back on did not have an effect. There was nothing wrong with the measurements.

 

I found this link. There is only one SCXI-1122 module connected to the SCXI-1000 chassis. I am puzzled because I thought I would be able to read data from all 16 channels. Will doing that damage or wear out the device? Right now, I am hoping I misunderstood the contents of the link.


Also, the device is about 6 months old and has hardly been used. So, I guess there is need for a reset everytime I start a measurement, at least when I am taking measurements from a single channel. Does this mean there is something wrong with the device? Also, do you know if I can reset the device from MATLAB?

 

Thank you very much,

baycan

0 Kudos
Message 7 of 13
(5,252 Views)

Hello Baycan,

 

Glad to hear from you.

 

I apologize for the confusion that knowledge base article needs to be clarified. I encountered the same noise you experienced when I set up my measurement in order to recreate the behavior you were seeing.  You will still get the noise of the switches moving from channel to channel even if you only have the 1120 in the chassis. The 1120 has an electromechanical switch in it that switches from channel to channel if you are taking measurements from different channels on the same task.  The article will be clarified to recommend that when you are reading multiple channels in one task that you should read a larger amount of samples from one channel before switching to the next channel. The picture below gives a good graphical presentation of what the article is referring to. 

 

Untitled.png

Yes you can read a signal from all 16 channels on one task although doing so will wear out the really on your device. As you have noticed this causes the relay to make an obnoxious noise and will wear down the mechanical switch in 1122. The above method (software selected scanning) will help save on your relay life if you wish to read multiple channels on one task.  

 

Please take a look at this Knowledge Base Article it better clarifies what I’m referring to and gives you further resources for setting up you SCXI module and chassis.  

 

I cannot ascertain from the information provided if there is an issue with the device. In order to make that determination I would have to know what version of the DAQmx driver you are using? Whether you have another SCXI-1122 you can test out in your chassis?  

 

I do not know the function call in MATLAB® but I can point you towards the following resources. The  ANCI C resources located in Start>>All Programs>>National Instruments>>DAQmx>>Text Based Code Support>>NI-DAQmx C Reference Help.  Here you can search for all the function calls of our DAQmx driver.

 

The following link points out what the specific calls are for the DAQmx reset in various software environments.

 

Also, a search of the MATLAB® help forums with key words DAQ reset should point you in the correct direction for finding the function call.

 

Regards,

 

Izzy O.

Applications Engineer

National Instruments 

 

0 Kudos
Message 8 of 13
(5,237 Views)

Hello Izzy,

I am using NI-DAQmx 9.6.

Unfortunately, I do not have any other SCXI-1122 modules, or any other modules I can plug to the chassis.

Let's say my sampling rate is 1 Hz and I am using the Good Technique to scan 4 channels. This means I would hear four clicks at the end of measurement duration(100 seconds), right? If I had been using the Bad Technique, I would hear it 4 times every second. Am I correct in this?

I tried to do something similar but I guess I couldn't get away from the Bad Technique. These were my settings:
Acquisition Mode: N-Samples
Samples to read: 10
Sample rate: 1 Hz
Channels: ai0-4

With these settings, I heard the click(s) every second. I could not find how to set up the Good Technique in SignalExpress or MAX. Is there some other setting I could not find?

Thank you very much,

baycan

0 Kudos
Message 9 of 13
(5,221 Views)

Hello baycan, 

 

Yes, your understanding is correct. The "bad technique" is known as interval scanning, and the "good technique" is known as Round Robin Scanning. You can see a good illustration of the differences here

 

To use round robin scanning, you need to change the interchannel delay. This is done with a timing property node in LabVIEW. Unfortunately, this property cannot be changed in a DAQmx Task with MAX. 

Maggie
National Instruments
Applications Engineer
ni.com/support
0 Kudos
Message 10 of 13
(5,199 Views)