I am using WaterGEMS SELECTSeries 6, build 08.11.06.113 32-bit.
I am attempting to set up a SCADA Signal connection to a GE Proficy Historian database. The connection has been successfully established, and by following the instructions in the article listed below I can get the list of tags to show up properly, and configure the SQL queries as needed. However, the actual queries fail.
The Signal Data SQL Statement I am using is:
set rowcount=5000, samplingmode=rawbytime select Tagname,Value,TimeStamp,Quality from ihRawData where (@requestedsignals) and ((TimeStamp>=1/1/2015) and (TimeStamp<=Now))
If I check the 'View SCADA log', I can see that the problem is an improperly constructed SQL statement:
set rowcount=5000, samplingmode=rawbytime select Tagname,Value,TimeStamp,Quality from ihRawData where ([Tagname]='CHURCH_DISCH_PSI') and ((TimeStamp>=1/1/2015) and (TimeStamp<=Now))
It has put brackets around the Tagname field. In the Edit Database Connection window, under Advanced, there are options to set the SQL Query Field Name Delimiters, which by default have brackets. I have deleted these, so there should be no prefix and suffix added, and yet the brackets are still appearing.
If I modify the query and replace "@requestedsignals" with a specific tag, such as "Tagname='CHURCH_DISCH_PSI'", the data points are properly imported. So I know that all other parts of the query are functioning as desired. How do I get @requestedsignals to properly populate the tagname query?
(By the way, if anyone else has the issue that you can't establish a database connection to something like Proficy Historian, and get an error that the provider is not registered on the local machine, try using the 32-bit version of WaterGEMS rather than the 64-bit version. The 32-bit application is located at C:\Program Files (x86)\Bentley\WaterGEMS\WaterGEMS.exe. This appears to be an issue with how and where dll files are registered.)
Referenced article:
communities.bentley.com/.../24309.configuring-scadaconnect-for-ge-historian-ge-proficy
Answer Verified By: Stephen Jackson