Jump to content

Python connection to Calypso


---
 Share

Recommended Posts

I don't think so, at least not officially. Calypso can open an Interface to external applications, but it's only meant for the transfer of measurment results
.
On the other hand PCM can access a lot of undocumented internal Calypso functions, so who knows what might be possible, but none of this is guaranteed to work in the future.
Link to comment
Share on other sites

You do not need Python in order to access a list of styli.

You are looking for a list of styli that are currently located in the probe rack configuration? You might give something like this a try.

//gets probes from rack to list, puts in text file, prompts for which probe to change to
probe ==""
repeat
deleteFile("c:\temp\proberack"+"_"+getRecordHead("planid")+".txt")
Probe_List="probe=inquireList("+chr(34)+"Select Probe To Make Active"+chr(34)
for i = 1 to getRackPorts().size
Probe_List=Probe_List+","+chr(34)+getParameterNamed(getRackPorts().asList,i)+chr(34)
next i
Probe_List=Probe_List+")"
addToFile("c:\temp\proberack"+"_"+getRecordHead("planid")+".txt" ,Probe_List)
runPCMFile("c:\temp\proberack"+"_"+getRecordHead("planid")+".txt")
until probe <> ""
changeStylusSystem(probe)
Link to comment
Share on other sites

Thanks Jeffrey, that looks great 🙂

However, to get this data I have to run the program.
What if I would like to get this data in the background.

I'm thinking to extract from my quite large database(It is on the network folder) only probe systems that are already mounted.
When I extract all it takes much time.

I already prepared a program that download database and extract only when the database has been updated, but still 1 extraction takes 15-25 seconds and i would like to improve that.

In addition, less qualification programs to choose could be more comfortable for operator.
Link to comment
Share on other sites

So you don't actually need to "run" a program. It can all be executed through an external PCM file. The only requirement is that it is interfaced through Calypso. (IE Calypso must be open). The prompt was just part of the sample. The PCM code sends all the "mounted" styli to a .txt file, the rest of it is just fluff for interaction possibility through assigned variables.

I guess it would be of benefit to know what the intent of the ask was. If you were creating a qualification program for all mounted styli then the direction would be totally different than if you were creating a script to verify that all probes needed for one or various inspections were available (Calypso already does the single inspection plan verification if you werent aware btw).

So clarify for me please. Have you written a Python script that extracts the stylus database, parses the data and can separate each data set into a usable format or are you just copying the SDO database once a change is detected.
Link to comment
Share on other sites

Yes, I have to precise.

We use FACS. When we choose qualification Facs automatically download archived data from network folder.
Next, FACS use bsdtar.exe for unpack the data. However FACS unpacks it each time when we choose qualification of the Stylus.
Unpacking takes 15-25seconds depends of the computer.

The programs for each stylus check the positions of the probe balls and the standard deviation
Archived stylus programs has a structure as below:
- probes.tgz
-- probes.tar
--- Program_1
--- Program_2
--- Program_3
--- Program_4
--- Program_5

For optimization I did some tests:
In the beginning I changed the FACS configuration - FacsLoader.exe.config

<add key="Unzipexepfad" value="tar"/>
<add key ="UnzipArguments" value="xzf"/>

instead of:

<add key="Unzipexepfad" value="path_to_bsdtar.exe"/>
<add key ="UnzipArguments" value="xzvf"/>


I changed bsdtar.exe" to tar which is already installed on Windows10.
"xzf" difference to "xzvf" that is not showing each file is unzip.
It gave us 25% time reduction, but still takes 10-15 s. before we can choose stylus to qualify.

So I prepared new simple program instead of "bsdtar.exe" that check if the new archived data is differ as the previous one.
The first unpacking still takes about 10 seconds but when we choose next qualification it checks if there is a new archive with programs for styluses. That takes 1second.

Next what I want is to unpack only styluses that are mounted on the machine.
So of that the operator could choose only those systems that are installed.
Do you have an idea if I can achieve that?
Link to comment
Share on other sites

Maybe I am missing the point but if you are looking to qualify only styli beyond a certain qualification date then PCM is a solid solution.
Use getProbe().probeDate and a time frame value in combination with getRackPorts() string to define if the probe is available and needs to be run from the current rack configuration in a solitary qualification program. No operator interaction necessary at all if it is written properly.

No external programs, no database extractions. Yes, Calypso needs to do the processing but only when running the qualification program and wont need to do any sort of database extraction.

Unless I am missing the point of you extracting all the SDCO info, I don't see the necessity. My apologies if I missed a detail somewhere.
Link to comment
Share on other sites

 Share

×
×
  • Create New...