Jump to content

Printing Reports in AutoRun


---
 Share

Recommended Posts

I have a friend who wants to know.....

Customer has 2 cmm's networked to one printer. They run a lot of pallet programs in AutoRun and the reports are printed automatically. Sometimes when both machines are running at the same time, the reports get shuffled together and the operators have to sort out the reports which is not only time consuming but also adds the risk of mixing up pages of reports.

Is there a solution available that could generate the printing of the reports at the end of the AutoRun cycle, instead of after each part is completed?

I look forward to hearing from you.
Link to comment
Share on other sites

So only whole reports get mixed up, not single pages? Otherwise I'd say this is a printer problem.

I don't know of an official setting for this. Each workpiece on a pallet means a complete restart of the whole measurement plan.

We make injection molded plastic parts and some time ago the operators asked me if it's possible to avoid entering all the identical header fields for each cavity at the start of a pallet. So I made a PCM script which copies the entries from the first page to all other cavities and also increments the cavity number.
From this I learned that the current run of a pallet part doesn't know anything of the preceding one. I had to save all the relevant information in a parameter file and read it back in in the next run.

I'd suggest to save all the reports as PDF files, and when the last part has been measured, make a PCM system call to some kind of print command that sends the reports to the printer. To find out when the last part has been measured, use the header variables palletlocationnumber, firstpalletlocationnumber and lastpalletlocationnumber.
Link to comment
Share on other sites

norbert
If you have profile plots printing out they are calculated & sent to the printer individually, followed by the custom report at the end.
I have several programs that take a good minute to digest all the profiles, so if 1 of the 4 other cmm's that share the printer pop during that time, they get mixed in.

Tom
#1
Do the operators have access to a network pc?
Could they view/print PDF reports right at the work station or quality lab?
These come out as 1 document including the plots & report.

#2
wait(10.0) //those are whole seconds
Put a wait in the post script, depending on the program it could be a couple seconds or a minute.
that way it gives the program time to catch up to itself, do some thinking.
It may not be the best idea for efficiency, but i bet it would help keep the reports in 1 lump.
Link to comment
Share on other sites

Roberto, I suggested the possibility of generating pdf's, and having operator print them manually after the run. Access to the pdf's is easily found in the Results tab at the upper right after the runs are finished. It still means a bit of operator's time and, of course, any time something is done manually, something could be forgotten.

Norbert, I don't think the customer has pcm but they could use a batch file (desktop shortcut) that prints "*.pdf", then moves "*.pdf'" to another archive location. At the end of the run, the operator double click's the icon, and prints all of his pdf's. It would be nice if the shortcut icon could be on the AutoRun interface.

Thanks to all.
Link to comment
Share on other sites

That's a possibility if they don't mind that each PDF report is printed right after the part has finished. To have the "print" icon on the Autorun desk they could make an (almost) empty measurement plan that just calls the correct batch file at the end.

But originally you asked for a solution where printing starts only when the whole palette is done. This is only possible with PCM, since you need an if..then statement to detect when the last part has been reached.
Link to comment
Share on other sites

Please sign in to view this quote.

Yes, thank you. I understand the pcm solution. I am extending my question to solutions outside of Calypso, i.e. batch files. After a lengthy Google search, I'm finding there are not many solutions for this using a standard .bat file. Many solutions involve downloading small utility programs but I don't want to go there if I don't have to.
Link to comment
Share on other sites

Maybe Acrobat Reader (if installed) is an option? My not so lengthy Google search found tips about commandline options sending PDF files to a printer.
Link to comment
Share on other sites

Please sign in to view this quote.

I will re-visit my google search. In the meantime, would you mind sending me just one of the links you found?

Also, I would like this solution to not be dependent on someone having Adobe. We use Nuance PDF Converter here. I understand I may need to utilize whatever pdf program is loaded.
Link to comment
Share on other sites

I think there may be 2 relatively simple fixes for this issue. The easiest would be a second printer. Next would be generating a print queue rather than the printer actually getting the job. Once the run is complete the queue can be sent to the printer manually or via a pcm command. An IT guy worth his salt could do this easily.
Link to comment
Share on other sites

I have a batch file that uses Ghostscript at the end of a pallet run to merge pdfs and then print the merged file. You will have to modify the batch file to use it with a specific measurement plan, i.e., the location where Calypso stores the pdfs, the names of the pdf files generated by Calypso, the location of the Ghostscript executable, and the number of parts in the pallet.

"report_end.bat"

@ECHO OFF

C:

REM Directory where Calypso stores pdfs
CD C:\Zeiss\Calypso\home\om\workarea\results

:File1
IF EXIST "4902838 Metering - Housing_1_gra.pdf" GOTO File2 ELSE GOTO END

:File2
IF EXIST "4902838 Metering - Housing_2_gra.pdf" GOTO File3 ELSE GOTO END

:File3
IF EXIST "4902838 Metering - Housing_3_gra.pdf" GOTO File4 ELSE GOTO END

:File4
IF EXIST "4902838 Metering - Housing_4_gra_gra.pdf" GOTO mergeFiles ELSE GOTO END

:mergeFiles
C:\gs9.23\bin\gswin64c -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf "4902838 Metering - Housing_1_gra.pdf" "4902838 Metering - Housing_2_gra.pdf" "4902838 Metering - Housing_3_gra.pdf" "4902838 Metering - Housing_4_gra.pdf"

REM Print File
C:\gs9.23\bin\gswin64c -dNOPAUSE -dBATCH -c "mark /QueryUser 3 /UserSettings <</DocumentName (MyDocName)>> (mswinpr2) finddevice putdeviceprops setdevice" -f out.pdf

DEL out.pdf

:END
Link to comment
Share on other sites

Creative approach, checking for the existence of certain PDFs instead of using the pallet variables (which would require PCM). I didn't think of this 🧑‍💻
Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
 Share

×
×
  • Create New...