[No...] Posted March 14, 2022 Share Posted March 14, 2022 Not sure where to put this... I've made a batch file that needs to be run each time a new measurement plan has been loaded. It works without issues in normal Calypso but fails in Autorun. Looks like Autorun ignores the inspection_post_load.bat file. I absolutely need to run the commands immediately after loading (I wish I could run it before). So I can't use any of the other batch files. Does anyone know of a way to do something equivalent which also works with Autorun? Editing each and every program is NOT an option however. PCM available. Link to comment Share on other sites More sharing options...
[Mi...] Posted March 14, 2022 Share Posted March 14, 2022 I'm curious what you are loading that inspection_start_pcm.txt (start of the measurement run) or inspection_pre_start_dialog_pcm.txt (before the start dialog appears) won't work for? I had to change to using inspection_start when we used Autorun and I've successfully be able to call anything I needed with it, instructions, .para files, etc So in any case, following for the solution. Link to comment Share on other sites More sharing options...
[No...] Posted March 14, 2022 Author Share Posted March 14, 2022 The batch file deletes all protheadpara files to prevent Caylpso from writing the contents to the protocol header (instead of using what is stored in the inspection file). I need this to solve a very special problem. It's a very long time since I made the batch file, but I think I remember that none of the other options was able to do exactly what I wanted, because at the time when the other files came into effect, the protheadpara data had already made its way into the protocol header. This is something that happens soon after loading. Link to comment Share on other sites More sharing options...
[Mi...] Posted March 14, 2022 Share Posted March 14, 2022 I haven't run into your problem that something is being written you can't change later, very curious about this especially if it's a PiWeb related issue because I want to eventually convert to PiWeb instead of the old custom printout we use. setRecordHead("vda_signature","") setRecordHead("procid","") setRecordHead("fixtid","") setRecordHead("startcomment","") With the inspection_start file we make sure any header data variables we care about has blank or 0 defaults in the first few lines and there is no way for the operators to run a program without updating them, I trap them in loops where the only ways out are to cancel the run or select a valid list item. But they aren't typing serial numbers or anything that PCM would struggle to validate, it's all selected from lists. Would using report_end_pcm.txt to delete what you need to delete after a run work for you? A danger with this is Calypso won't run that file run if a program didn't finish normally. Link to comment Share on other sites More sharing options...
[No...] Posted March 16, 2022 Author Share Posted March 16, 2022 It has nothing to do with PiWeb. The problem I'm talking about is company-specific and probably won't affect 99.5% of everybody else. It think it doesn't make much sense to describe and discuss it here. Only so much: Calypso stores protocol header data in (at least) two locations: In the inspection file and in the protheadpara file. If a program is loaded and a protheadpara file exists, its content is written to the header and overwrites the data from the inspection file. If somebody then resaves the program and the protheadpara contained unwanted data, it is written to the inspection file. This is what I need to prevent. 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