Re: [foxboro] Current Date & Time

Thank you!  That is exactly what I needed.=20

-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx]
On Behalf Of Johnson, Alex P (IPS)
Sent: Wednesday, February 27, 2008 2:36 PM
To: foxboro@xxxxxxxxxxxxx
Subject: Re: [foxboro] Current Date & Time

Regarding creating a string variable in a Sequence block that holds the
time and date.

The Station block in your CP has M, D, Y, H, M parameters that can be
accessed from within the sequence code and turned into a string.

The gist of the line is something like:

SN0001 :=3D3D :CP0001_STN:STATION.YEAR + "/" + :CP0001_STN:STATION.MONTH =
+
"/" :CP0001_STN:STATION.HOUR + " " + :CP0001_STN:STATION.HOUR + ":" +
:CP0001_STN.MINUTE;


Alternatively, you can create a CALC block and use the TIM command to
get the seconds since midnight and use logic to calculate the current
hour, minute, and second.

In that case, you sequence block could reference that data.


As for running a program on an AW/WP, it can be done. I'll send you a
write-up off list. It's not hard, but there are caveats.



Regards,

Alex Johnson
Invensys Systems, Inc.
10900 Equity Drive
Houston, TX 77041
713.329.8472 (voice)
713.329.1700 (fax)
713.329.1600 (switchboard)
alex.johnson@xxxxxxxxxxxxxxxx


-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx]
On Behalf Of Lango, Trevor M (GE Contractor)
Sent: Wednesday, February 27, 2008 10:14 PM
To: foxboro@xxxxxxxxxxxxx
Subject: [foxboro] Current Date & Time

Does anyone know of a way to set a block parameter (i.e. SN0001 of a DEP
block) to the current system date and time?  I can do it with an
external shell script executed from a display command; however, I want
the date/time to be updated based on another block parameter, not an
operator action.  On a related note, does anyone know of a way to
execute a shell script from an I/A block?



=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D=
3D3D=3D3D3D=3D3D3D=3D3D3D=3D3
D3D=3D
=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D
=3D3D3D=3D3D
=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D=
3D3D=3D3D3D=3D3D3D=3D3D3D=3D3
D3D=3D
=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D=3D3D3D
=3D3D3D=3D3D
=3D3D3D=3D3D3D
Trevor M. Lango
Controls Engineer, R. J. Roberts, Inc.
Tesoro Petroleum, Golden Eagle Refinery
150 Solano Way, Martinez, CA 94553
Phone: (925) 228-1220 ext. 2338
Fax:   (925) 335-3582
Email: tlango.contractor@xxxxxxxxxxx
 =3D

 =3D

_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 =3D

foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3D3Djoin
to unsubscribe:
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3D3Dleave
 =3D



* Confidentiality Notice:
This e-mail and any associated files are intended solely for the
individual=3D  or entity to whom they are addressed. Please do not copy =
it
or use it for =3D any purposes, or disclose its contents to any other
person. Further, this e=3D -mail and any associated files may be
confidential and further may be legal=3D ly privileged. This email is =
from
the Invensys Process Systems business uni=3D t of Invensys plc which is =
a
company registered in England and Wales with i=3D ts registered office =
at
Portland House, Bressenden Place, London, SW1E 5BF =3D (Registered =
number
166023).  For a list of European legal entities within t=3D he Invensys
Process Systems business group, please click here http://www.in=3D
vensys.com/legal/default.asp?top_nav_id=3D3D77&nav_id=3D3D80&prev_id=3D3D=
77.

If you have received this e-mail in error, you are on notice of its
status.=3D  Please notify us immediately by reply e-mail and then delete
this message =3D from your system. Thank you for your co-operation. You
may contact our Help=3D desk on +44 (0)20 7821 3859 / 2105 or email
inet.hqhelpdesk@xxxxxxxxxxxxx T=3D his e-mail and any attachments =
thereto
may be subject to the terms of any a=3D greements between Invensys =
(and/or
its subsidiaries and affiliates) and the=3D  recipient (and/or its
subsidiaries and affiliates).


=20
=20
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
=20
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         =
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Djoin
to unsubscribe:      =
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Dleave
=20
 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: