0

Getting creative with external files.

Here's a thought I have been pondering that perhaps more experienced writers might have an idea on. In many of the new procedures I have been writing I've included error checking and self-validation. They prompt the operator if any error codes pop up. Which is fine for me as I have so many manuals that I have built a fort around my desk to keep people away. So I (usually) have the key for what the error codes mean. But planning for the future, it is unlikely those who follow after me will. So I am thinking of ways to include these Status and Error Messages into procedures. Some instruments I have gotten away with putting then in DISP messages as there were only 4-5 codes the unit would spit out. But some things like the Keithley 2400C has four pages of status codes. One thought I have is to screen capture these tables, save them as pictures then call on them using the PIC FSC in Met/Cal. But I wonder, is there a way for Met/Cal to call up a PDF or even a simple txt? I know it's possible on some level as I read about external txt files in a manual about flex standards and looked to see if I could manipulate the RINFE MATH function to pull it off but that is seeming like an unlikely prospect. Using the PIC FSC seems like a pretty workable solution but I was wondering there were other ideas or better ways of doing this.

8 comments

Date Votes
0
Avatar
Jerral Plowman

The way I open PDF's is using a portable version of PDF reader, SumatraPDF is open source and has a portable version, sumatrapdfreader.org.

Here is an example,

1.001 MATH S[2]= "T:\\UserPrograms\\Filename.pdf"

1.002 DOS SumatraPDFPortable.exe [S2]

The PDF will open, Met/Cal will wait until the PDF is closed before proceeding.

 

BTW SumatraPDFPortable.exe needs to be in your UserPrograms folder or wherever you have your metcal.ini pointed to

0
Avatar
Dexter

!!! I have never used the DOS FSC nor was ever sure how it worked. You have taught me much today, great sensei! This opens a ton of other possibilities and ideas. Moreso than I had been thinking about upon my orignal asking. In fact, I don't see why that couldn't be used to run python scripts as well...

Thank you! You have given my curiosity many more hours of experimenting to do.

0
Avatar
James Steeds

I sometimes put error codes in an ini file which the procedure can query to display verbose translations.

0
Avatar
Michael J.

You could also use the LIB FSC, I would imagine, Dexter. I haven't used it with a PDF reader before, but any with a COM object should be relatively simple to use, if you take a look at the Excel examples with the LIB FSC.

0
Avatar
Dexter

From what I have been looking up, it appears the LIB FSC was new to Met/Cal version 8. I do not know if version 7 has that as it's not in any of my manuals.

0
Avatar
Dexter

From what I have been looking up, it appears the LIB FSC was new to Met/Cal version 8. I do not know if version 7 has that as it's not in any of my manuals.

0
Avatar
Michael J.

Oh, no, it was introduced in version 8. I forgot you were running 7 still.

Time to upgrade :-)

0
Avatar
Dexter

lol, working on it. I believe our upgrade was scheduled to happen 8 months ago. I'll look forward to playing with that new feature, hopefully before the heat-death of the universe.

Please sign in to leave a comment.