Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84612members
353910posts

[Imported] sql animation code not calling correctly.

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
sbeadle
Janeway Janeway
Janeway
0 Likes
1
432

[Imported] sql animation code not calling correctly.

>>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.

 


Accepted Solutions
sbeadle
Janeway Janeway
Janeway
0 Likes
0
431

Re: [Imported] sql animation code not calling correctly.

>>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!

See Answer In Context

1 Reply 1
sbeadle
Janeway Janeway
Janeway
0 Likes
0
432

Re: [Imported] sql animation code not calling correctly.

>>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!