Alan,
Thanks for looking at it.
Quote:
Originally Posted by Alan Anderson
compressor:
It looks like you are only setting the Smart Dashboard variable once when the program begins. Unless you put the CompressorGetEnableState and SD Write functions in a loop, you won't get updated values.
|
I guest I didn't get the snippet to show what was in the loop. The CompressorGetEnableState and SD Write functions are indeed in the Periodic Tasks in the 100ms loop. outside is the compressor refnum, control loop and start. The compressor is running properly I just cannot get the dashboard to read the enabled status when the compressor is running. I am trying to have an indicator on the dashboard showing that the compressor is running. Potentially to see that it is running and we might be too low on air to operate something.
Quote:
Originally Posted by Alan Anderson
range:
I don't understand why you're doing the analog configuration every 100 ms. It just needs to be set once, typically in Begin. The only thing you need to do in the Periodic Task loop is read the voltage and set the SD variable.
|
Everything but the range refnum is, again, in the periodic tasks 100ms loop. Should I only have the get avg voltage in the loop and everything else on the outside?
We are using an ultrasonic range finder a maxbotix MB1013 (its metric, someone accidently ordered metric...) to find our distance from the wall. I am simply trying to post that numer to the dashboard near the same area as the compressor "on" indicator.
Quote:
Originally Posted by Alan Anderson
Thank you for posting your code as vi snippets. It let me clean up the wiring and see something very confusing. In both cases, you are apparently sending the RefNum from the RefNum Get function to a front panel indicator, and the RefNum you are using to read the value is coming from a separate front panel control. Can you explain what you are trying to do there?
|
Kinda confused about this part unless I explained it above?