06-19-2011, 04:10 PM
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
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