In response to Ron's first question:
The following program gets the time stamp from "ShotCounter" and puts the
time into "ShotTime" in string format.
program tsGen
%{TS_STAMP ts;}%
option -c;
long shotNum;
assign shotNum to "ShotCounter";
monitor shotNum;
string shotTime;
assign shotTime to "ShotTime";
long prevShotNum;
ss getTs {
state newShotNum {
when (shotNum != prevShotNum) {
prevShotNum = shotNum;
/* get time stamp */
ts = pvTimeStamp (shotNum);
/* convert to string */
tsStampToText (&ts, TS_TEXT_MMDDYY, shotTime);
pvPut(shotTime);
} state newShotNum
}
}
Because TS_STAMP and TS_TEXT_MMDDYY are not declared to snc this code produces two
compiler warning. These warning can be ignored. If the warnings bothers you can use
the -w compile option.
Andy
- Navigate by Date:
- Prev:
Sequencer help; pvTimeStamp Ron Chestnut
- Next:
free_gdct for alpha5 Janet B. Anderson
- Index:
1994
1995
<1996>
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Sequencer help; pvTimeStamp Ron Chestnut
- Next:
Re: Sequencer help; pvTimeStamp Ned Arnold
- Index:
1994
1995
<1996>
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|