# 1 "../chirpUpdate.st" # 1 "/afs/slac.stanford.edu/g/lcls/vol8/epics/iocTop/FFController/MAIN_TRUNK/ffControllerApp/src/O.RTEMS-beatnik//" # 1 "" # 1 "" # 1 "../chirpUpdate.st" program chirpUpdate short chirpState; assign chirpState to "FBCK:{IOC}:{LOOP}:CHIRPSTATE"; monitor chirpState; double chirpValue; assign chirpValue to "FBCK:LI22:1:CHIRP"; double chirpDesired; assign chirpDesired to "FBCK:{IOC}:{LOOP}:CHIRPDES"; ss chirpUpdate { state INIT { when() { printf("*** INIT chirpUpdate ***\n"); pvGet(chirpValue, SYNC); } state CHIRP_UPDATE } state CHIRP_UPDATE { entry { pvGet(chirpValue, SYNC); pvGet(chirpState, SYNC); } when(delay(1.)) { if (chirpState < 1) { pvGet(chirpValue, SYNC); chirpDesired = chirpValue; pvPut(chirpDesired, SYNC); } } state CHIRP_UPDATE exit { pvGet(chirpState, SYNC); pvGet(chirpValue, SYNC); } } }