help with a CMD prompt scripting

EICS

Member
Join Date
Dec 2008
Location
Melbourne, Australia
Posts
323
Can someone please assist to help with a command prompt script from the command prompt "CMD" windows script host



from my SCADA i want to check the status of a device.


the executable to do this is as follows


isactive.exe


this will either return "Active" or "Standby" depending on the devices status


i would like to display a "message window" by using the following code in command prompt but i do not know the syntax.



IF return is Active then


msg %username% Device is in "ACTIVE" mode !

ELSE

msg %username% Device is in "STANDBY" mode !

a self closefeature would also be nice with both windows after 5 seconds if possible if not the ok button that is displayed as default will suffice
 
Can someone please assist to help with a command prompt script from the command prompt "CMD" windows script host



from my SCADA i want to check the status of a device.


the executable to do this is as follows


isactive.exe


this will either return "Active" or "Standby" depending on the devices status


i would like to display a "message window" by using the following code in command prompt but i do not know the syntax.



IF return is Active then


msg %username% Device is in "ACTIVE" mode !

ELSE

msg %username% Device is in "STANDBY" mode !

a self closefeature would also be nice with both windows after 5 seconds if possible if not the ok button that is displayed as default will suffice

Which SCADA ?

Any particular reason why you are wanting to use CMD prompt to achieve this ?

Most SCADA systems there is no need to step out of the application to check device status or drive message boxes, they generally all provide these functions inside the application.
 
Hi tragically1969

i have Citect SCADA.

the plant also uses a 3rd party alarm paging app (email, sms, voice etc) application called WIN-911 communicating via OPC-DA.

i need to have a way of showing the status of the notifier Via SCADA. i can do this from the notifier app but it is challenging to set this up from the Client scada workstations and not allow control of the notifier.

when a maintenance day is scheduled with personnel onsite they can be given access to control the notifier, so as not to page out.

by using simple scripting i can simply show the status and then allow control under SCADA security if the status needs to be changed, i can also log who changed it and when.

can you help with scripting ? its not easy for me as an Electrician.
 
Hi tragically1969

i have Citect SCADA.

the plant also uses a 3rd party alarm paging app (email, sms, voice etc) application called WIN-911 communicating via OPC-DA.

i need to have a way of showing the status of the notifier Via SCADA. i can do this from the notifier app but it is challenging to set this up from the Client scada workstations and not allow control of the notifier.

when a maintenance day is scheduled with personnel onsite they can be given access to control the notifier, so as not to page out.

by using simple scripting i can simply show the status and then allow control under SCADA security if the status needs to be changed, i can also log who changed it and when.

can you help with scripting ? its not easy for me as an Electrician.

Sorry, not something i can help with really, if you needed to do it in Citect i may be able to help.

Just FYI the best alarming paging system we have found for Citect is SMS Server, uses the CtAPI which is much better than OPC

http://smsserver.cpsistemi.it/index.php/en/
 
can you possibly write the same in CITECT VBA or a VBS script?


either of those 2 would do the same thing i think. my code writing skill is simple at best.
 
I's still a bit confused how you are going to get the device status out of the Citect system into the windows scripting environment ?


did some further work today and it is close just need some help with the conditional If Else.


Remember - the device is a 3rd party app that uses OPC-DA to get the SCADA triggers for message notification


i use a button with a cicode command exec to launch the script file ( *.BAT or *.CMD) in the windows script host environment


it will work, as i have done similar things already like using *.VBS/*.VBA script to email out reports directly from Citect.
 
Last edited:

Similar Topics

Always have been able to. What am i doing wrong? I just get and error message (see screenshot) [/URL]
Replies
5
Views
2,008
I've adjusted the IP of the Panelview Plus as well as the DNS servers; the screen does not show up in the search when I go to the transfer utility...
Replies
3
Views
97
Hi Everyone, I own a GE Versamax controller that I purchased for a class at Long Beach City College a couple of years ago. I lost the use of my...
Replies
5
Views
84
I was wondering if anyone could help i am trying to use a SLC 500 with a 5/05 processor to set up an incremental encoder to a HSCE2 card? The card...
Replies
2
Views
139
Hello, I am working with cimplicity workbench, I have made changes to the current project from this machine I am using in the past. However when...
Replies
0
Views
49
Back
Top Bottom