LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ scaling information

Solved!
Go to solution

I have a DAQ device that measures 0 - 10 volts input. We are measuring a signal that goes from 0 - 15 volts, so we are atenuating the signal by a factor of 2.  In MAX I have created a scale with a slope of 2 which should be able to display the input voltages of 0 - 15 volts, and the graphs that display this show this to be correct, so I guess that the voltage put out of the device is actually in the range of 0 - 15 voltages because of the scale factor.  If I go into the graph properties box I notice that there is another selection for setting up scales for the graph itself. And when I put a scale factor of 2 into the multiplier, the scale on the graph changes to 0 - 40 instead of the original 0 - 20 as made through the scaling done by MAX.  Am I correct in assuming that the original DAQ output is still 0 - 20 and that the scale itself has been changed without affecting the original range as configured in MAX?  In several of my graphs I have a total of 3 plots shown in each graph where two of the plots are voltage 0 - 10 volts and the third plot is shown up related to a second scale which is for temperature, which would have a range of 0 - 8000 degF.  I noticed that to create this seperate scale I had to first make a duplicate scale and swap it over to the other side of the graph and set the scaling on this scale appropriately and the make the original scale invisible so that only the temperature would show up with the correct range, since the original, now invisible voltage scale had to be 0 - 20 volts and the temperature had to be 0 - 20000 degF.  It seems to be the thing to do to make the graphs show up with the correctly scaled temperature even though the voltage levels being measured are 0 - 20 for all the plots on the graph.  Does this seems correct?

0 Kudos
Message 1 of 11
(4,241 Views)

If I go into the graph properties box I notice that there is another selection for setting up scales for the graph itself. And when I put a scale factor of 2 into the multiplier, the scale on the graph changes to 0 - 40 instead of the original 0 - 20 as made through the scaling done by MAX.  Am I correct in assuming that the original DAQ output is still 0 - 20 and that the scale itself has been changed without affecting the original range as configured in MAX? 


You can easily verify what the pre-scaled signal is by checking the reading from the channel in a Test Panel in MAX.

 

Regards,

Nathan S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(4,207 Views)

I have 11 channels configured in MAX for this device: the first 10 channels have a custom scale of 2 and the 11th has a scale of 1. When I show the custom scale popup box the horizontal axis says 0 - 10 and the vertical axis says 0 - 20 for the scale factor or 2 and 0 - 10 for the scale factor of 1 which says to me that this device will output signals in these ranges especially since  that is what the linear graphs are showing.  I also notice that when I run these tasks in MAX the graph displays shows all 11 channels, but the amplitude axis never goes over +10 or under -10! Since I have a scale factor of 2 for 10 of these  channels I would think that MAX would have an amplitude of +20 to -20 because of the scale factors made in MAX!  So reading the channels in MAX has me perplexed. I do know that in the VI that uses this configuration the charts all, by default, show up with amplitude scales of 0 - 20, and I am guessing that this is so because LabVIEW is smart enough to know what scale to set the chart to from the MAX configuration and scales. Also, running this VI using the DAQ simulated device shows that the charts are showing signals that range from 0 - 20. And the probe tools verifies this!  This also seems to be a problem since the 11 channels were not all scaled by a factor of 2: one of them has a scale factor of 1.  So why are the charts all showing simulated signals that are in the range of  0 - 20 for the signals with scale factors of 2 and the scale factor of 1 still shows up in the same chart with amplitudes over 10!  The scaling factors setup in the properties box for the charts are all set to 1 for the multiplier. Shouldn't the scale by 1 plot be in the 0 - 10 range in the chart?

0 Kudos
Message 3 of 11
(4,193 Views)

Perhaps you could create and post a simple example of the behavior you're seeing (not with all 11 channels--perhaps just one). Reducing your code down to the simplest form possible will help both you and anyone in the community to be better able troubleshoot it. 

 

Just a thought!

 

Regards,

Nathan S.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 11
(4,179 Views)

The code is already attached to a previous post and the code itself is quite simple. The DAQ task send three waveforms into each graph where the first two channels are scaled by 2 and the third channel is scaled by 1.  The  signals coming out of MAX are all screwed up, and I did post another message describing how I put a 9 volt battery as in input to the device and MAX is still all messed up with the voltage levels that it is showing in MAX.

0 Kudos
Message 5 of 11
(4,161 Views)

Actually if you look at a scaled signal in MAX you will see the scaled signal values in MAX and this can be verified since I put in a 9 VDC signal into the device and saw MAX showing the scaled ampiltudes in the table listing in MAX. I did this with a real device and not a simulated device. In my device, which is a USB 6211 board, the scaled by 2 signals show up at twice the input amplitude for a voltage range of 0 - 5 VDC and MAX showing values of 0 -10 VDC from MAX table of values for the device. So I guess that MAX does show the scaled values!  However, something strange is happening with this device when I input a value greater than 5 VDC. For instance, if I input a value of 9 VDC MAX shows a value of 10.86 VDC and not 18 VDC!!! This is very strange behavior for this device and I am really stumpted by this behavior and can think of no reason for this behavior, so if anyone has an answer to this it would be greatly appreciated.

0 Kudos
Message 6 of 11
(4,146 Views)
This has already been answered in one of your other numerous threads on the exact same question. Stop spamming the board.
0 Kudos
Message 7 of 11
(4,141 Views)

Sorry about the spam. I do access this site from home and work and have different accounts so I probably talked about this problem more than once. If I knew how to access this site and use the same account from both sites this probably would not have happened, but I have not figured out how to get to the same site from two different locations especially since I have two accounts which I would rather not have. I you can tell me how to access the same account from two different locations without two different accounts then this will not happen. In the meantime I must say that most of the solution to this scaling problem I have done, and not without a lot of searching and experimenting around to get the thing running with the scaling factors set up. NI give very little information for setting up scaling: all it does it tell you how create, delete and configure custom scaling!  After a lot of fooling around I finally found out from the help menu for the DAQ Create Virtual Channel VI that there were two un talked about inputs: channel name and units.  It seems like the units input can be used to select custom scaling and the other input is for the scale names as set up in MAX. Where in NI site is this even talked about? I guess the user is supposed to know this stuff my some sort of mental means. OK the scaling does show up in the waveform and up top 5 VDC input the scales of 2 and 1 show up in the MAX data table as expected.  However, when I go over 5 VDS for the input, the scale does not work!   9 VDC shows up as 10.8 VDC and not the 18 VDC that I expected. This is the only remaining problem with this USB 6211 device and I would sure like to know why the scaling is not working for values over 5 VDC.

0 Kudos
Message 8 of 11
(4,122 Views)
You do tend to ramble on, don't you? You finally read the help and then you ask ' where are these inputs talked about?'.

To remind you what was said, did you change the input range to +/- 20?
0 Kudos
Message 9 of 11
(4,116 Views)
Solution
Accepted by topic author cuthbert

Yes I went into MAX and changed the input range for the 2X scaling channels to +20 & -20 volts as you mentioned, but I am still getting around 10.86 VDC as the data for the 2X scaling channels and 9 VDC for the 1X scaling channel! Yeah I do tend to ramble, but bear with me as I've been working on this scaling problem for the past week and this showing the correct data range is the only thing left to complete the thing.

0 Kudos
Message 10 of 11
(4,109 Views)