LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Negative values for z-scale on an intensity graph?

Hi - this is my first post so please be gentle with me. I've been working with Labview a few months now, but I can't get my head aroud this problem. I've done all the usual searches on the forums but not found anything.

Anyway, what I'm trying to do is produce a graduated-colour (color!) indicator that tracks the value of a control knob. If you try out the attached .vi you can see it nearly works. In fact, if you adjust the numbers on the block diagram so they are all positive, it works fine. But it won't work for negative numbers.

Anyone have any idea why? Or can suggest another approach to this?

Thanks for any help in advance!

Jon.
0 Kudos
Message 1 of 4
(2,973 Views)
hi jon, did u try using property nodes for the intensity graph. set the z scale minimum to the desired negative value, maximum to the desired value, that might work. i am not able to view your vi because im working on 6.1 so if u could send me a print screen of your code i might be able to help u. pavira
0 Kudos
Message 2 of 4
(2,964 Views)
Hello Jon,

you cannot run a FOR loop with a negative loop count. That's impossible (in every programming language).
But you can create arrays containing negative numbers...

I changed your example. It's not what you wanted wanted, but it works...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(2,963 Views)
Hello Jon,

you cannot run a FOR loop with a negative loop count. That's impossible (in every programming language).
But you can create arrays containing negative numbers...

I changed your example. It's not what you wanted wanted, but it works...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,963 Views)