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,987
please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
203
Hi Everyone, i was hoping for a little help with this module. i have data that needs to be read from a different plc through the Modbus plus...
Replies
11
Views
168
Hello, I am trying to replicate a piece of logic on the PLC5 onto an SEL RTAC. I am using ladder on SEL and FBD. I am having issue on the ladder...
Replies
13
Views
163
Back
Top Bottom