Dragscript Flow Control based on Observing Conditions

Is there a way to implement flow control based on Observing Conditions?

I would like, for instance, to be able have Dragscript wait for the ambient temperature to drop below a set threshold before starting to cool the camera. Or, for that matter, to be able to raise a Suspend Event if RH exceeds a set threshold.

I see that it there is a Dragscript element to Wait for a “Viking Analog Input to Remain In Range” and while it might be possible to implement what I am seeking using it, that would be a cumbersome way of going about it.

It would be useful if Dragscript flow control could be expanded to include Observing Conditions.

For instace, “Wait until Temperature < x” or “DO IF RH > x”.

Probably worth some thought as to how this could best be implmented, but I thought posting this topic might serve to get some user input on the subject.



To add to my own post … it could also be very useful to be able to raise events based on, say Input Voltage … this might allow users to turn off devices such as cameras to avoid damaging them in the event that battery power drops too low …

Hi Michael,

I suggest you to check the DragScript section in the wiki:

This will solve pratically what you have requested.

Some blocks that do what you asked:




Some info about:

  • Observing conditions are not too stable alone to raise emergency events so use the Weather control in Voyager that is born for this, or the Safety Monitor or Text Monitor. We do not use observing conditions for raise emergency events, you can read it and raise yourself the events.

  • For reading voltage and raising events use a small electronic circuit (OP Amp comparator) to check the voltage and change status of a digital input of your I/O card in Viking.

Thanks, Leo. I hadn’t noticed that you can set a variable on Observing conditions. That ought to allow me to implement a “wait until temperature < x functionality.

I’ll have to figure out exactly how, but that ought to permit it.

As far as reading voltage, Viking does read it as an analog input when connected to a Pegasus UPBV3 (or UPBV2, i think). The only thing that it appears dragscript can do with it, though, is sit in a loop waiting for it to fall within a range. It would be useful if this could form part of Observing conditions so you can do as much with voltage as ambient temperature, even if it doesn’t quite fit what you might expect a definition of an observing condition. Both are provided by the Pegasus UPBV2/3.

Thanks again,

Michael N.

You can find example searching in this forum, its really easy.
Create a variable, store the value of observing condition check the content with the DO IF

You cannot read in loop a voltage or generally a physical measure, this is not the scope of this kind of automation software.

You must read and filtering data with an electrical circuit and send to a digital input of your I/O card if there is one otherwise you need another I/O card really cheap like the denkovi that have 8 digital input. In this way you can read with emergency events system of Voyager.

If you want you can ask for a custom development to add Analogic input (like the voltage and current of your pegasus) like source for triggering emergency event. Please reach me in PM or by support email for a quote.

1 Like

I found that using a single dragscript element, Wait for Analog In remain in range, looks like it will accomplish the task of monitoring ambient temperature as reported by my UPBV3 via Viking to delay cooling my camera until ambient is below a threshold temperature.

The observing conditions variable method would no doubt work as well, but the one line solution seems simpler.

I understand your point about monitoring voltage. While this could certainly be done by adding hardware as you’ve suggested, I am trying to keep hardware to a minimum for portable, non remote imaging. I figure the Pegasus voltage reading is already well filtered and conditioned. If there was a way of adding it to the Observing Conditions already obtained from the UPBV2/3, then using it to generate events would be straightforward.

Both of these measures (monitoring temperature and voltage) are ones I think it’s prudent to take to protect and extend the longevity of expensive hardware.

Thanks very much for your help on this.

Michael N.

Just a note, the medium good quality hardware has protection systems against over and under voltages. We should all invest in this as in good software!

You’re right, All my QHY cameras have UVLO protection. I’d just rather not solely rely on it.

Thanks again,