Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
transsecscriptingmethodlist [2024/11/17 13:49] wikiadmin |
transsecscriptingmethodlist [2024/11/17 14:42] (current) wikiadmin |
||
---|---|---|---|
Line 5: | Line 5: | ||
====Common Declarations==== | ====Common Declarations==== | ||
- | Be sure to declare the classes used from the API so you can reference these by name in the code. | + | Be sure to declare the classes used from the API so you can reference these by name in the code. Here are some examples of classes you may want to use: |
- | <code javascript> | + | <code javascript> |
+ | var DataSource = Java.type(' | ||
+ | var LongValueObject = Java.type(' | ||
+ | var TransSecsController = Java.type(' | ||
+ | var SOFTREV = Java.type(' | ||
+ | </ | ||
+ | |||
+ | ====SOFTREV==== | ||
+ | |||
+ | SOFTREV is a class in the SECS/GEM package which has a maxLength parameter you can set to allow 20 character SOFTREV and MDLN values | ||
+ | |||
+ | <code javascript> | ||
+ | SOFTREV.maxLength=20; | ||
+ | </ | ||
====TransSECSController==== | ====TransSECSController==== | ||
Line 27: | Line 40: | ||
</ | </ | ||
+ | There are also some methods you can use on the tool instance: | ||
+ | |||
+ | <code javascript> | ||
+ | tool.setDeviceId(2); | ||
+ | tool.setPort(5000); | ||
+ | </ | ||
====GemHandler==== | ====GemHandler==== | ||
Line 35: | Line 54: | ||
eventServer = gemHandler.getServerForName(" | eventServer = gemHandler.getServerForName(" | ||
vidServer = gemHandler.getServerForName(" | vidServer = gemHandler.getServerForName(" | ||
+ | |||
+ | //example to trigger an event | ||
+ | eventServer.setIntValue(1); | ||
+ | |||
+ | //directly set values to vids using the gemHandler | ||
+ | gemHandler.setValue(" | ||
+ | gemHandler.setValue(" | ||
+ | |||
+ | //access vid values | ||
+ | controlState = gemHandler.getServerForName(" | ||
+ | |||
</ | </ | ||
+ | |||