Hey guys it's been a while since I last posted anything here.
Kinda stuck on something I feel as though is really easy but I'm just not getting it...
But let's get right to it.
Posting it in Web Development General because I didn't see a section for ASP.
I'm working with a Osisoft PI server that displays real-time updating values per PI tag.
We are displaying the information in the simplest way possible using ASP, which will display the PI tags' value when you refresh it.
However, when it comes to ASP, I'm trying to figure out how to take the static PI tag within the array and use it for a function to display in that same array.
Please refer to my code above.
Array is as follows:
In other terms:
There aren't too many guides on ASP online as most just pull up ASP.NET related information.
I tried declaring the target value as an integer:
before writing in the code, then putting in the arithmetic function to carry out, but that does not work and gives the page errors.
I've looked into VBscript for looping and if/then/else statements. I'm wondering what I would need to use loops instead?
Do I even need to use VBscript? I think I can accomplish this using purely ASP.
I've gone to W3Schools.net and read up on a few things, but they don't seem to help.
Can anyone guide me on how to pull a static value for a PI tag, and then use it in an arithmetic operation within the same array, and then display it with the correct real time calculation?
The code I am working with uses HTML, VBScript, SQL, and connects to a remote server to pull in values per tags associated with them.
I feel as though I may have to change the way my code builds the HTML table and SQL statements? Or maybe it does not see the PI tag as a numerical value? Not sure where to start.
Additional Information Just in case:
HTML Code for building the table:
If any questions or need any additional information let me know.
Any and all suggestions, help, and guidance is much appreciated as I've been stuck on what route to go.
Thanks everyone!
Kinda stuck on something I feel as though is really easy but I'm just not getting it...
But let's get right to it.
Posting it in Web Development General because I didn't see a section for ASP.
I'm working with a Osisoft PI server that displays real-time updating values per PI tag.
We are displaying the information in the simplest way possible using ASP, which will display the PI tags' value when you refresh it.
Dim u7
u7 = Array(_
Array("", "", "", ""), _
Array("Watts", "U7RL:348", "110", "", "") _
However, when it comes to ASP, I'm trying to figure out how to take the static PI tag within the array and use it for a function to display in that same array.
Please refer to my code above.
Array is as follows:
Array("LABEL/TITLE OF PI TAG", "STATIC PI TAG DISPLAYING A VALUE (NOT THE TAG)", "TARGET VALUE", "DIFFERENCE BETWEEN PI TAG AND TARGET VALUE"), _
In other terms:
Array("Temperature", "TEMP:01", "32", "TEMP:01 - 32"), _
There aren't too many guides on ASP online as most just pull up ASP.NET related information.
I tried declaring the target value as an integer:
intTarget = 32
before writing in the code, then putting in the arithmetic function to carry out, but that does not work and gives the page errors.
I've looked into VBscript for looping and if/then/else statements. I'm wondering what I would need to use loops instead?
Do I even need to use VBscript? I think I can accomplish this using purely ASP.
I've gone to W3Schools.net and read up on a few things, but they don't seem to help.
Can anyone guide me on how to pull a static value for a PI tag, and then use it in an arithmetic operation within the same array, and then display it with the correct real time calculation?
The code I am working with uses HTML, VBScript, SQL, and connects to a remote server to pull in values per tags associated with them.
I feel as though I may have to change the way my code builds the HTML table and SQL statements? Or maybe it does not see the PI tag as a numerical value? Not sure where to start.
Additional Information Just in case:
' Build the WHERE clause of the SQL statement with all the tag names '
strWhere = ""
strWhere = BuildSQL(u7, strWhere)
strSQL = "SELECT status, tag, text = DIGSTRING(status), Rval=Value FROM picomp WHERE tag in (" & strWhere & ") AND Time = DATE('*')"
' Execute the SQL statement'
Set oRecordSet = oConnection.Execute(strSQL, nRec)
if Err.number <> 0 then
ErrorHandler 2
end if
' Build the 'vib USS' table '
response.write "<HR><TABLE class = 'clsTable'>"
response.write "<TR>"
response.write "<TD><U> Unit 7 </U></TD>"
response.write "</TR>"
response.write "<TR>"
response.write "<TD><U>Descriptions</U></TD>"
response.write "<TD><U> Current Value </U></TD>"
response.write "<TD><U> Target Value </U></TD>"
response.write "<TD><U> Difference </U></TD>"
response.write "</TR>"
BuildTable0 u7, oRecordset, 0
response.write "</TABLE>"
HTML Code for building the table:
<style>
body
{
background-color:black;
}
.clsTable
{
cellspacing: 0;
cellpadding:0;
font-weight: bold;
font-size: 8pt;
color: white;
font-family: Tahoma;
background-color:black;
frame:void;
}
</style>
If any questions or need any additional information let me know.
Any and all suggestions, help, and guidance is much appreciated as I've been stuck on what route to go.
Thanks everyone!