EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2019-11-06 12:41 PM . Last Modified: 2023-05-03 12:27 AM
>>Message imported from previous forum - Category:Scripts and Tips<<
User: ROVSCADAENGINEER, originally posted: 2019-03-06 22:28:40 Id:378
For some reason when I copy the following code into the animation section the SQL on the actual Query is writing different values. When I copy the following code into the animation section on the sql animation of the list:
'SELECT RECORDTIME, SEVERITY, SOURCE, MESSAGE, USER, CATEGORY, FOREGROUND, SEQNO, COMMENTNO, ID FROM CDBEVENTJOURNAL WHERE SOURCE LIKE ''%Fault Status'' AND ( RECORDTIME BETWEEN { OPC ''H-14D'' } AND { OPC ''H'' } ) AND SEVERITY = ''High'' AND MESSAGE LIKE ''%Alarm raised'' '
the below code is generated in the SQL section on the list:
SELECT
RECORDTIME, SEVERITY, SOURCE, MESSAGE, USER, CATEGORY, FOREGROUND, SEQNO, COMMENTNO, ID
FROM
CDBEVENTJOURNAL
WHERE
SOURCE LIKE '%Overflow Float' AND ( RECORDTIME BETWEEN { OPC 'H-7D' } AND { OPC 'H' } ) AND SEVERITY = 'Critical' AND MESSAGE NOT LIKE '%Alarm cleared'
I think that it is jumping to another stored registry instead that is stored on the server and am not sure how to get around this.
Any thoughts or suggestions? there are other pages on the server using similar registry codes, but I am confused as to why it is altering and adding a completely different code from another page on the SQL section of the list.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2019-11-06 12:42 PM
>>Responses imported from previous forum
Reply From User: ROVSCADAENGINEER, posted: 2019-03-07 03:26:48
The Code is actually working fine what I did not realise was happening is that the name of the registry key being used for the database search is the same for each server. Hence when one button with a different configuration is clicked on one page the same Query was applied to the other lists. As they are both referring to the same register.
On that is it possible in clear SCADA to make new individual registers for each page and what is the effect this would have on the size and readability of the database. Say for instance I wanted to have two completely unrelated pages with registry click buttons that both queried the CDBEVENTJOURNAL.
Reply From User: adamwoodland, posted: 2019-03-13 01:36:14
You can include the mimic's fullname as the Registry key, or the mimics id if you want something shorter. That gives you a unique key per mimic per workstation.
Reply From User: ROVSCADAENGINEER, posted: 2019-03-15 00:43:37
thanks Adam! greatly appreciated!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2019-11-06 12:42 PM
>>Responses imported from previous forum
Reply From User: ROVSCADAENGINEER, posted: 2019-03-07 03:26:48
The Code is actually working fine what I did not realise was happening is that the name of the registry key being used for the database search is the same for each server. Hence when one button with a different configuration is clicked on one page the same Query was applied to the other lists. As they are both referring to the same register.
On that is it possible in clear SCADA to make new individual registers for each page and what is the effect this would have on the size and readability of the database. Say for instance I wanted to have two completely unrelated pages with registry click buttons that both queried the CDBEVENTJOURNAL.
Reply From User: adamwoodland, posted: 2019-03-13 01:36:14
You can include the mimic's fullname as the Registry key, or the mimics id if you want something shorter. That gives you a unique key per mimic per workstation.
Reply From User: ROVSCADAENGINEER, posted: 2019-03-15 00:43:37
thanks Adam! greatly appreciated!
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.