[Mi...] Posted June 25, 2021 Share Posted June 25, 2021 I want to use PCM to duplicate my chr files for use with QC-Calc... QC-Calc moves the files when done and this breaks other software that needs the files... so I want to duplicate the file somewhere just for QCCALC. Problem is, many cmms, different file format settings where the chr file is created with different header variables in it's filename. I would really like to say grab everything that ends with c:\path\to\results\*wildcard*_chr.txt" and copy to a location. The file copy function is easy enough, but i haven't found a wildcard option. preferably with PCM, I know it can be done with .bat files. is that an option? Link to comment Share on other sites More sharing options...
[He...] Posted June 26, 2021 Share Posted June 26, 2021 I don't think there is but you can use batch-commands directly in systemcall() like this. (Don't use this command cause I'm a newbie with command and this will probably crash something) I'm not sure if you need the cmd.exe-part but I can't test it right now. command = "cmd.exe xcopy c:\temp\*.txt d:\storage\" systemCallWithWait(command) Link to comment Share on other sites More sharing options...
[Me...] Posted June 28, 2021 Share Posted June 28, 2021 Please sign in to view this quote. This is probably the safest option in the event Zeiss decides to change something in the future. In the meantime........ chrFiles = executeCode("'" + getRESULTS() + "'asFilename allFilesMatch: '*_chr.txt'") for i = 1 to chrFiles.size display(getParameterNamed(chrFiles,i).asString) next i Link to comment Share on other sites More sharing options...
[Zo...] Posted December 1, 2021 Share Posted December 1, 2021 i do the exact same thing using runend.bat and save it in C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\inspections open a text file type in as per below and save it as runend.bat in above folder xcopy c:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\*_chr.txt c:\CNCFeedbackData\ /c /a /r /y xcopy c:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\*.txt c:\spcdata\ /c /m /r /y basically everything in green is the path of where files are being send now red is what extensions you want to copy blue is destination folder calypso runs this bat file at the end of each run, automatically this works with QC-Calc. in matter of fact in QC-Calc help file you can find the complete breakdown Link to comment Share on other sites More sharing options...
[Mi...] Posted December 1, 2021 Author Share Posted December 1, 2021 Please sign in to view this quote. Thank you for that! I ended up coming up with the same solution, but with PCM instead of a batch file, simply because I'm not well versed at all in batch file creation... in the .txt file, report_end_pcm.txt I have: because of no wildcard I have to pull every single variable we use to title the table files... was a pain to make the first time, but it works perfectly and can simply be copied to any of our machines. //Copies table files to new location for use with QC-CALC //------Variable Declaration------ planName=getRecordHead("planid") planIncPartNum=getRecordHead("partnbinc") planDate=getRecordHead("date") planMachNum=getRecordHead("procid") planHour=strElement(1,":",getRecordHead("time")) planMinute=strElement(2,":",getRecordHead("time")) planSecond=strElement(3,":",getRecordHead("time")) //------File Name Creation------ planFileNameCALYPSO=planName+"_"+planIncPartNum+"_"+planMachNum+"_"+planDate+"_"+planHour+"_"+planMinute+"_"+planSecond planFileNameQCCALC=planName+planIncPartNum //------Copy Results Table Files from standard results directory, to a new one just for QC-CALC copyFile("C:\data\cmm\stf\results"+"\"+planFileNameCALYPSO+"_chr.txt","C:\data\cmm\stf\results QC-CALC"+"\"+planFileNameQCCALC+"_chr.txt") copyFile("C:\data\cmm\stf\results"+"\"+planFileNameCALYPSO+"_hdr.txt","C:\data\cmm\stf\results QC-CALC"+"\"+planFileNameQCCALC+"_hdr.txt") copyFile("C:\data\cmm\stf\results"+"\"+planFileNameCALYPSO+"_fet.txt","C:\data\cmm\stf\results QC-CALC"+"\"+planFileNameQCCALC+"_fet.txt") Link to comment Share on other sites More sharing options...
[Ad...] Posted August 25, 2023 Share Posted August 25, 2023 Please sign in to view this quote. Hello, can you use the PCM command with "copyfile" also for PDF files? Example: 1. measurement done 2. evaluation performed 3. PiWEB report done 4. PiWEB Report is saved on drive F executed Function with PCM possible? 5. copy PiWEB Report 6. PiWEB Report is saved on drive S executed So we have a measurement report which is saved on drive F and S. Link to comment Share on other sites More sharing options...
[Je...] Posted August 25, 2023 Share Posted August 25, 2023 This is all pretty standard PCM file handling routines. I'll post a "similar" routine that I have posted before. You should be able to reconfigure it to work for your application. If you cannot, I recommend reading the PCM manual PDF found in your C:\Program Files (x86)\Zeiss\CALYPSO 7.6\userinfo\manuals\en-US and/or taking the PCM courses offered on the ZEISS PORTAL ACADEMY CalypsoEndRslt = "C:\Users\Public\StoredReports\PDF Reports\" //change to where you want the file to move to CalypsoRslt = directoryPath("results")+"\" DateTime = " - "+dateInNumbers()+" - "+time() EXCEL_BaseName = CalypsoRslt+getRecordHead("planid")+"_"+getRecordHead("partnbinc") EXCEL_XLSX = EXCEL_BaseName+".xlsx" EXCEL_XLS = EXCEL_BaseName+".xls" if fileExists(EXCEL_XLSX) copyFile(EXCEL_XLSX,EXCEL_XLS) wait(1) deleteFile(EXCEL_XLSX) endif Link to comment Share on other sites More sharing options...
[Mi...] Posted August 25, 2023 Author Share Posted August 25, 2023 Please sign in to view this quote. Jeesh I've learned a lot since writing that example I posted 2+ years ago. Didn't know there was a directoryPath() function though... that would have been nice lol. STILL wish PCM had a wildcard function. Link to comment Share on other sites More sharing options...
[Je...] Posted August 25, 2023 Share Posted August 25, 2023 Please sign in to view this quote. Right from the PCM manual pdf that is installed automatically with every CALYPSO installation. Page 1-72. C:\Program Files (x86)\Zeiss\CALYPSO #.#\userinfo\manuals\en-US directoryPath() actuals The directory for actual values. actualInspection The directory of the current measurement plan. applicationData The user directory. up to CALYPSO 5.4: \home\om from CALYPSO 5.6: Installation directory (e.g. C:\Users \Public\Documents\Zeiss\CALYPSO\). defaultInspections The default directory of measurement plans (\workarea \inspections). defaultResults The default directory of results. (\workarea\results). formplott The directory of CALYPSO form plots. inspections The user-defined directory of measurement plans. programFiles The directory of program data. up to CALYPSO 5.4: \opt\om from CALYPSO 5.6: Installation directory (C:\Programs \Zeiss\CALYPSO v.v, v.v being the current version number). protform The directory of printout templates. results The user-defined directory of results. workarea The workarea directory. 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