Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Setting default value
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have the variable driver called var with a field LastRainDate of type Time and I'm trying to have a triggered event set the value to the current time and then to set this new value as its default. The trigger is working fine as the current value is changing but the default is staying blank; here is what I'm doing:

If System::GrThan
P1=$(davisvpro2.Rain_Rate)
P2=0

Devices::FieldWrite
P1=var.LastRainDate
P2=%(StdRTV:TimeStamp)
P3=True

Devices::SendDrvCmd
P1=var
P2=SetFldDefault
P3=LastRainDate

End
pilotguy7ca Wrote:I have the variable driver called var with a field LastRainDate of type Time and I'm trying to have a triggered event set the value to the current time and then to set this new value as its default. The trigger is working fine as the current value is changing but the default is staying blank; here is what I'm doing:

If System::GrThan
P1=$(davisvpro2.Rain_Rate)
P2=0

Devices::FieldWrite
P1=var.LastRainDate
P2=%(StdRTV:TimeStamp)
P3=True

Devices::SendDrvCmd
P1=var
P2=SetFldDefault
P3=LastRainDate

End

I think you may have to exit the Admin and restart (the admin) to see the change.
jkish Wrote:I think you may have to exit the Admin and restart (the admin) to see the change.

Yup, thanks, that was it!