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,988
I have an old Sentry Palletizer (S/O Number 3007 / Serial Number 1172) that has lost its program as the backup battery died years ago. I can...
Replies
0
Views
86
Hello, I need to write the following program in Ladder language, but I could not integrate the Fibonacci sequence into the ladder. Can you help...
Replies
22
Views
458
this a program to send data to barcode printer I want to integrate a new printer in a new machine and i wanted to adapt the old prgram on it but I...
Replies
4
Views
172
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
64
Back
Top Bottom