01-02-2018 03:36 PM
Working on a simple 4-20ma output, trying to read that and scale it to a displacement measurement range 0-10mm...pretty simple stuff. Linear relationship y= mx+b (m = 0.625, b = -2.5)
I'm trying to use the custom scaling vi for the first time and getting stuck...error -200077
What I don't understand why the scaling vi is messing with the create channel vi. The module i have in my cDaq is ±20ma so i need to set the lower limit to 4ma in the create channel...at least i think so.
Let me know what i'm missing and thanks.
Solved! Go to Solution.
01-02-2018 03:45 PM
It is impossible to see how things are connected from the picture (backwards, overlapping, hidden wires, etc.). Please do a diagram cleanup and post again.
01-02-2018 05:40 PM
@coolhandLV7 wrote:
The module i have in my cDaq is ±20ma so i need to set the lower limit to 4ma in the create channel...at least i think so.
That is where you went wrong. The max and min you apply to the channel should be AFTER the scale is applied. In other words, your max and min should be your max and min displacements.
01-03-2018 09:55 AM
Below is the cleaned up code as requested. I also changed the channel limits to the displacement range as suggested but i still get the same error. I've also added the actual error message, looks like it wants a value == to (b) [-2.5]
01-03-2018 10:23 AM
Your problem is your slope. You did the math assuming mA. But the DAQ actually measures in A. So your slope is off by a factor of 1000 (it should be 625).
01-03-2018 10:39 AM
Wow...thanks. Super simple...can't believe i overlooked it.