- Posts: 60
- Thank you received: 1
Batch file processing
6 days 20 hours ago #295
by jds
Batch file processing was created by jds
Hello,
I was wondering if there's a possibillity to add a large number of objects (and of course configure them) by using text commands?
I have a list of +/- 3000 alarms to be processed, all the same setup for ex. a din connected to a dsup, text and din given by a database.
I was wondering if there's a possibillity to add a large number of objects (and of course configure them) by using text commands?
I have a list of +/- 3000 alarms to be processed, all the same setup for ex. a din connected to a dsup, text and din given by a database.
Please Log in or Create an account to join the conversation.
5 days 21 hours ago #297
by claes
Replied by claes on topic Batch file processing
Hi jds,
You can use wb script. Wb script is described in Designer’s Guide and in the online help (command ’help script’). Use the script function CreateObject() and SetAttribute(). If you can export the alarm info on text file there are also script functions to read and parse text files.
DSup object can be placed in the plant hierarchy and will then be examined by the event monitor every second. If you need higher time resolution you have to place the DSup in the plc code, and it is possible also to create plc objects with script. There is an example in Release Notes V5.3, Plc editing with script.
/Claes
You can use wb script. Wb script is described in Designer’s Guide and in the online help (command ’help script’). Use the script function CreateObject() and SetAttribute(). If you can export the alarm info on text file there are also script functions to read and parse text files.
DSup object can be placed in the plant hierarchy and will then be examined by the event monitor every second. If you need higher time resolution you have to place the DSup in the plc code, and it is possible also to create plc objects with script. There is an example in Release Notes V5.3, Plc editing with script.
/Claes
Please Log in or Create an account to join the conversation.
3 days 22 hours ago #298
by jds
Replied by jds on topic Batch file processing
Aha, I never been so far in the man_dg so that explains why I never thought about it 
A lot to explore!
Probably the simplest part of it all but I can't find it: where to place the scripts and do the have to have the extension .pwr_com?
A lot to explore!
Probably the simplest part of it all but I can't find it: where to place the scripts and do the have to have the extension .pwr_com?
Please Log in or Create an account to join the conversation.
1 day 23 hours ago #299
by claes
Replied by claes on topic Batch file processing
Hi jds,
The default directory to execute a script is from where you start the configurator. Otherwise you have to specify the directory, and surround the file name with quotes if it contains a slash, eg
> @"$pwrp_exe/some_script"
You can use any extension but if the extension is pwr_com it doesn't have to be specified in the command.
/Claes
The default directory to execute a script is from where you start the configurator. Otherwise you have to specify the directory, and surround the file name with quotes if it contains a slash, eg
> @"$pwrp_exe/some_script"
You can use any extension but if the extension is pwr_com it doesn't have to be specified in the command.
/Claes
Please Log in or Create an account to join the conversation.
Time to create page: 0.593 seconds