src/api/model/cncVariables.ts
This class groups all the services related to CNC built-in variable system.
QUERCUS/8070 CNC has a built-in variable system to get data related to cnc operation, tables, parameters, etc.
Cnc variables are well documented in installation and variable manuals distrubuted FAGOR HQ.
Methods |
|
constructor(_hmiComm: CommHmiNodeServer, cncKernelType: enums.CncKernelType, route: string, cncNodeIndex: number)
|
|||||||||||||||
Parameters :
|
Async read | |||||||||||||||
read(varName: string | string[], cncNodeIndex: number)
|
|||||||||||||||
Read cnc system variable and returns it. Returns a ServiceResponse promise. This promise is fulfilled with returnCode = 0 if everything is ok and data = Variable object or an array of Variable objects, or returnCode = -1 when something goes wrong. Variable may contain a raw value that cannot be converted, for example, the number of channels in the system or may have a positionment value convertible to mm or inches.
TODO: Document fsys internal return codes.
Parameters :
Returns :
Promise<ServiceResponse>
|
Public Async readLegacyVariable | ||||||||||||
readLegacyVariable(varName: string | string[], cncNodeIndex: number)
|
||||||||||||
Parameters :
Returns :
Promise<ServiceResponse>
|
Async write | ||||||||||||||||||||
write(varName: string | string[], varValue: | (string | number)[], cncNodeIndex: number)
|
||||||||||||||||||||
Writes variable value Returns a promise. This promise is fulfilled with reply object ServiceResponse or is rejected with CncServiceOperationException when something goes wrong. return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
TODO: Document fsys internal return codes.
Parameters :
Returns :
Promise<ServiceResponse>
|