Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gem300_scripts [2021/07/12 18:31] wikiadmin |
gem300_scripts [2024/09/19 14:54] (current) wikiadmin |
||
---|---|---|---|
Line 80: | Line 80: | ||
print (" | print (" | ||
// send the new state for the process job to the PLC | // send the new state for the process job to the PLC | ||
- | /E40PLC/ | + | /GEM300PLC/ |
- | /E40PLC/ | + | /GEM300PLC/ |
}, | }, | ||
| | ||
Line 89: | Line 89: | ||
print ("Job Creation of " + prJob.getPrJobId() + " permitted" | print ("Job Creation of " + prJob.getPrJobId() + " permitted" | ||
// indicate that this job is not allocated | // indicate that this job is not allocated | ||
- | /E40PLC/ | + | /GEM300PLC/ |
// record the id | // record the id | ||
- | /E40PLC/ | + | /GEM300PLC/ |
}, | }, | ||
| | ||
Line 122: | Line 122: | ||
| | ||
// first indicate which process job the command is being executed on | // first indicate which process job the command is being executed on | ||
- | /E40PLC/ | + | /GEM300PLC/ |
// send the parameters - here we just print them | // send the parameters - here we just print them | ||
if ( prCmdParameterList != null ) { | if ( prCmdParameterList != null ) { | ||
Line 132: | Line 132: | ||
// get the index of the command | // get the index of the command | ||
cmdId = cmds.indexOf(prCmd); | cmdId = cmds.indexOf(prCmd); | ||
- | /E40PLC/ | + | /GEM300PLC/ |
} | } | ||
}; | }; | ||
Line 143: | Line 143: | ||
// | // | ||
Thread.sleep(50); | Thread.sleep(50); | ||
- | controller = TransSecsController.findController(" | + | controller = TransSecsController.findController(" |
} while (controller == null); | } while (controller == null); | ||
| | ||
Line 173: | Line 173: | ||
} | } | ||
</ | </ | ||
- | | + | ==== E40 Python Example ==== |
+ | <code python> | ||
+ | # | ||
+ | import jpype | ||
+ | from jpype import JProxy, JArray, JInt | ||
+ | import jpype.imports | ||
+ | from jpype.types import * | ||
+ | |||
+ | jpype.startJVM(classpath=[' | ||
+ | |||
+ | # Importing the necessary Java classes | ||
+ | from com.ergotech.secs.e39 import E39MessageHandler | ||
+ | from com.ergotech.secs.e40 import E40MessageHandler, | ||
+ | from com.ergotech.transsecs.secs import TransSecsController | ||
+ | from java.lang import Thread | ||
+ | |||
+ | # Create the callback interface using a proxy | ||
+ | class E40CallbackImplementation(E40CallbackInterface): | ||
+ | def prStateChange(self, | ||
+ | print(f" | ||
+ | # Send the new state for the process job to the PLC | ||
+ | # / | ||
+ | # / | ||
+ | |||
+ | def prJobCreate(self, | ||
+ | print(f" | ||
+ | # Indicate that this job is not allocated | ||
+ | # / | ||
+ | # Record the id | ||
+ | # / | ||
+ | |||
+ | def prSetRecipeVariable(self, | ||
+ | if recVarList is not None: | ||
+ | for counter in range(recVarList.size()): | ||
+ | print(f" | ||
+ | |||
+ | def prSetMtrlOrder(self, | ||
+ | # Set the order in which process jobs should be processed | ||
+ | pass | ||
+ | |||
+ | def prCommandCallback(self, | ||
+ | print(f" | ||
+ | cmds = [' | ||
+ | # First indicate which process job the command is being executed on | ||
+ | # / | ||
+ | |||
+ | if prCmdParameterList is not None: | ||
+ | for counter in range(prCmdParameterList.size()): | ||
+ | print(f" | ||
+ | |||
+ | # Get the index of the command | ||
+ | cmdId = cmds.index(prCmd) | ||
+ | # / | ||
+ | |||
+ | # Instantiate the callback | ||
+ | E40Callback = E40CallbackImplementation() | ||
+ | |||
+ | # Main Python code | ||
+ | print(" | ||
+ | |||
+ | controller = None | ||
+ | while controller is None: | ||
+ | Thread.sleep(50) | ||
+ | controller = TransSecsController.findController(" | ||
+ | |||
+ | try: | ||
+ | E39MessageHandler.addMessageHandler(controller.getControllerName()) | ||
+ | E40MessageHandler.addMessageHandler() | ||
+ | except Exception as e: | ||
+ | print(e) | ||
+ | |||
+ | # Register the callback | ||
+ | E40ServiceWrapper.getInstance().registerCallback(E40Callback) | ||
+ | |||
+ | print(" | ||
+ | |||
+ | </ | ||
==== E94 ==== | ==== E94 ==== | ||
Line 180: | Line 256: | ||
=== E94 Service Wrapper === | === E94 Service Wrapper === | ||
- | The E94 Service Wrapper provides access to control the flow of E94, however there are not actions required by the tool controller to manage a control job. | + | The E94 Service Wrapper provides access to control the flow of E94, however there are no actions required by the tool controller to manage a control job. |
=== E94 Callback Interface === | === E94 Callback Interface === | ||
Line 275: | Line 351: | ||
</ | </ | ||
- | === E94 Callback Interface === | + | === E87 Callback Interface === |
The E87 Callback Interface provides notification of activity from the host. A sample implementation of the interface is provided below. The tool control system should implement as many of the methods are required to progress the carrier through the tool. | The E87 Callback Interface provides notification of activity from the host. A sample implementation of the interface is provided below. The tool control system should implement as many of the methods are required to progress the carrier through the tool. | ||
< | < | ||
- | var E40Callback | + | var E87Callback |
| | ||