[Ka...] Posted Monday at 09:48 AM Share Posted Monday at 09:48 AM Hello experts, We have around 1,500 programmes, the majority of which run via Autorun. To display the workpiece positioning status, we use ‘CNC → Measurement Sequence Information for CNC start-up'. This does not link directly to an image, but rather to a small script that launches a simple and secure image viewer. For historical reasons, this is a *.bat command script that has many drawbacks. We would like to replace it with VB/Perl/Python... However, to do this, we would have to open more than 600 programes manually to change the link from XXX.bat to, for example, XXX.vb. This is not an option. Simply call from this *.bat script a VB script lead to open an terminal window ( one of the big drawbacks..) for up to seconds. This should be mainly suppressed. Is there a way to run this change as a batch job? The entries are contained in the inspection/inspset files.. Best Regards Karsten Link to comment Share on other sites More sharing options...
[Ma...] Posted Monday at 10:08 AM Share Posted Monday at 10:08 AM I can handle that, but i would need to know what to do - what changes you need? Link to comment Share on other sites More sharing options...
[Ch...] Posted Monday at 12:00 PM Share Posted Monday at 12:00 PM Please sign in to view this quote. you can make the VBS script run in a hidden window by using the "0" parameter. For example, I run a lot of .bat files but I want the terminal window hidden from operators, so I use something like this. Set WshShell = CreateObject("WScript.Shell") WshShell.Run "cmd.exe /c C:\Path\To\your_file.bat", 0, False Link to comment Share on other sites More sharing options...
[Da...] Posted Monday at 12:32 PM Share Posted Monday at 12:32 PM Notepad++ Search > Find in Files > Replace in Files 1 Link to comment Share on other sites More sharing options...
[Ka...] Posted Monday at 12:39 PM Author Share Posted Monday at 12:39 PM Chad, Thanks for the tipp. I already use this but unfortunately the terminal window from calling Process ist still open because I have to wait until the image viewer is started to send via IPC a signal. Otherwise the window is not in focus. This take around 1-2 second´s and the terminal is still open this time. David, Thanks but I prefer to use vi 🙂 or in this face find, grep,awk ... The big question is: If I change the inspection/inspset files, will CALYPSO take account of it or is it ignored or more worse: Is running but use save program will overwrite the changed files with old values. Martin, Fine, but what do you use to do this? Link to comment Share on other sites More sharing options...
[Ma...] Posted Monday at 01:00 PM Share Posted Monday at 01:00 PM I would need what approach you want to go. Mass edit of inspection file changing ".bat" to another executable or another approach? I am using vbs script which hides batch window while having scheduled task. CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False Using it like hidden.vbs do_work.bat Link to comment Share on other sites More sharing options...
[Ri...] Posted Monday at 06:59 PM Share Posted Monday at 06:59 PM Please sign in to view this quote. I have used this method many times. Always have a backup pf the original file. Link to comment Share on other sites More sharing options...
[Ka...] Posted 5 hours ago Author Share Posted 5 hours ago Please sign in to view this quote. Hi Martin, The problem is that CALYPSO (vwnt.exe) always launches the Windows Command Prompt for external programmes (*.bat) and “CNC process information”. This forces a terminal window to open (shortly). The only way to prevent this completely is to place a wrapper cmd file in the path of vwnt.exe that has been compiled as winexe. This will ensure that no terminal window is opened at all 🙂 Anyway: The link to a script for displaying the CNC sequence information in the event of a programmable stop is stored in the inspection file. To be able to change this via a batch file, I first need to locate it, which means I’d need to know the structure of the file. There could well be several such entries... Example: #Dictionary) #parameters: '') #text: 'Bitte umdrehen' #pathOfFile: '\\fs1\Messmaschinen\Programme\Zeiss\DuraMax\Entwicklung\Z-Autorun\MessAbInfo\QB00031.bat') #( But the information what to display as CNC sequence information as standard ist stored in inspset file like: #( #getActualFailed ' ->' false) #( #graphicUserInfo ' ->' '\\fs1\Messmaschinen\Programme\Zeiss\DuraMax\Entwicklung\Z-Autorun\IconStart\QB00031.bat') #( #hasStartSystem ' ->' false) #( Link to comment Share on other sites More sharing options...
[Ma...] Posted 4 hours ago Share Posted 4 hours ago OK, do you have a substitutes for BAT files ready? There are several approaches possible - if you have a substitute, then you can rename text in files from ".bat'" to ".vb'" ( fill your extension ) or we can keep BAT files and do a workaround. I can even make a little EXE which will run that BAT file, but your IT can be against - also i would need to test, if you can fill that path with commands. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in