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
1,983
Hi all I need help on this As in my project used Schneider TM241 controller. Now I want to communicate Elite energy meter with controller by...
Replies
0
Views
16
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
7
Views
67
Good day all! Can someone help me with the procedure to update Beijers E700 firmware? The Panel I am working on is firmware 2.04v and I would...
Replies
1
Views
47
Hi, We have an application that has a device that goes through a reboot (appears un-graceful) What then happens is the MVI module appears to hang...
Replies
0
Views
58
Back
Top Bottom