Jump to content

Pull data from a different program


---
 Share

Recommended Posts

Hello,

We have few part numbers that have two programs. On the second program it has a condition or a formula that asks to enter one of the results from program 1.
The program just hangs there until someone puts the number and hits ok. Moving that to the end of the program is fine but i was wondering if there was a formula that allowed for Calypso to pull that results from Program 1 automatically instead of having to manually typing it in.
I know it is possible if the result is in the same program but this result is in the previous program.


Thank You,
Nixon Uruchima
Link to comment
Share on other sites

With pcm it is easy

for example:
you can add into the postsettings of the wanted characteristics of program 1 following code:

path=the path you want+"\"
addToFile(path+"the name of the file.txt", getNominal().identifier+"="+getActual().actual)

getNominal().identifier takes the name of your characteristic in program 1 and sets it as a variable into the file

in program 2 you can read this file with runPCMFile() (mayby in a "inspection_start_pcm.txt") or readPCMFile() and set the variables into result elements

at the end of program 2 (maybe a "calculation_end_pcm.txt") you can delete the file with deleteFile(), so it doesn´t get bigger and bigger with every run
there are some other ways, this is an easy one
Link to comment
Share on other sites

Please sign in to view this quote.

where do you get these codes from? but this seems pretty straightforward.
Would this be possible without PCM and just formulas?

We don't have PCM. Well we only have it on one CMM but thats not the CMM this part runs on.
Link to comment
Share on other sites

These codes are standard PCM codes.
I don´t know a way to do it without PCM-option, because addToFile() doesn´t work without. If it would work without, there would be a way, to write the file as a .para-file, that you can read without PCM at the programstart of program 2 I guess, but to write the file, you need the PCM-option
Link to comment
Share on other sites

Please sign in to view this quote.

Yea you are going to need PCM here. Jens response nails it.

The only work around I could even see to help the operators enter the right number in program two would be with task scheduler and a Powershell script that watches the second programs date modified field, refreshing every second so that when the second program is opened, the date modified changes, the Powershell script executes and goes to grab the last text file or PDF or whatever created from the first program and opens it automatically so its right there to enter the values you need for the second program. I did something like that before, but it still involves a human so error is always possible. ChatGPT is your friend if that's the path you want to go down.
Link to comment
Share on other sites

 Share

×
×
  • Create New...