src/api/interface/toolsAndMagazineServices.ts
Class that provides generic services for cnc tools and magazines manipulation.
Methods |
|
constructor(hmiComm: CommHmiNodeServer, route: string)
|
|||||||||
|
Parameters :
|
| Public backupMagazineToFile |
backupMagazineToFile(magazine: number, file: string, cncNodeIndex?: number)
|
|
Writes the magazine places to a file. 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. |
| Public backupToolAndMagazineDataToFolder |
backupToolAndMagazineDataToFolder(folder: string, cncNodeIndex?: number)
|
|
Writes the configuration of the CNC tools, the active tools and the magazine places to a folder 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. |
| Public backupToolsToFile | ||||||||||||
backupToolsToFile(file: string, cncNodeIndex?: number)
|
||||||||||||
|
Writes the configuration of the CNC tools to a file. Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public createNewTool | ||||||
createNewTool(cncNodeIndex?: number)
|
||||||
|
creates new tool in a free position of the table Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public deleteTool |
deleteTool(id: number, cncNodeIndex?: number)
|
|
deletes a tool with id Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error. |
| Public disableMagazinePlace |
disableMagazinePlace(magazine: number, position: number, cncNodeIndex?: number)
|
|
Disable magazine place 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. |
| Public enableMagazinePlace |
enableMagazinePlace(magazine: number, position: number, cncNodeIndex?: number)
|
|
Enable magazine place 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. |
| Public getMagazineInfo |
getMagazineInfo(magazine: number, cncNodeIndex?: number)
|
|
Get magazine information Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error. |
| Public getMagazinePlaces |
getMagazinePlaces(magazine: number, cncNodeIndex?: number)
|
|
Get magazine places Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error. |
| Public getMagazineStatus |
getMagazineStatus(magazine: number, cncNodeIndex?: number)
|
|
Get magazine status information Returns a promise. This promise is fulfilled with reply object ServiceResponse. return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error. |
| Public getMagazineType |
getMagazineType(magazine: number, cncNodeIndex?: number)
|
|
Get magazine type information Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error. |
| Public getToolAndEdgeInfo | ||||||||||||||||
getToolAndEdgeInfo(toolId: number, edgeId: number, cncNodeIndex?: number)
|
||||||||||||||||
|
retrieves Tool and Edge information Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public getToolInfo | ||||||||||||
getToolInfo(id: number, cncNodeIndex?: number)
|
||||||||||||
|
It retrieves tool information Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public getToolListEx | ||||||
getToolListEx(cncNodeIndex?: number)
|
||||||
|
Returns an array of all the tools installed in the cnc. Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public initializeMagazine |
initializeMagazine(magazine: number, cncNodeIndex?: number)
|
|
Empties the tool magazine 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. |
| Public initializeMagazineWithTools |
initializeMagazineWithTools(magazine: number, cncNodeIndex?: number)
|
|
Fills the tool magazine with tools 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. |
| Public loadToolToToolChangerArm1 |
loadToolToToolChangerArm1(magazine: number, id: number, cncNodeIndex?: number)
|
|
Load tool to the tool changer arm 1 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. |
| Public loadToolToToolChangerArm2 |
loadToolToToolChangerArm2(magazine: number, id: number, cncNodeIndex?: number)
|
|
Load tool to the tool changer arm 2 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. |
| Public manualLoadToolToMagazine | |||||||||||||||
manualLoadToolToMagazine(magazine: number, id: number, position: number, cncNodeIndex?: number)
|
|||||||||||||||
|
Manual loading of a tool into the tool magazine 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.
Parameters :
|
| Public manualUnloadToolFromMagazine |
manualUnloadToolFromMagazine(magazine: number, id: number, cncNodeIndex?: number)
|
|
Manual unloading of a tool from a tool magazine 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. |
| Public resetMagazineEmergency |
resetMagazineEmergency(magazine: number, cncNodeIndex?: number)
|
|
Reset the magazine error status 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. |
| Public restoreMagazineFromFile |
restoreMagazineFromFile(magazine: number, file: string, cncNodeIndex?: number)
|
|
Recovers the magazine places from a file. 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. |
| Public restoreToolAndMagazineDataFromFolder |
restoreToolAndMagazineDataFromFolder(folder: string, cncNodeIndex?: number)
|
|
Recovers the configuration of the CNC tools, the active tools and the magazine places from a folder 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. |
| Public restoreToolsFromFile | ||||||||||||||||
restoreToolsFromFile(file: string, initializeMagazines: boolean, cncNodeIndex?: number)
|
||||||||||||||||
|
Recovers the configuration of the CNC tools from a file. Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public setActiveTool | ||||||||||||||||
setActiveTool(channel: number, id: number, cncNodeIndex?: number)
|
||||||||||||||||
|
Set the active tool of a channel Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public setMagazineMode | ||||||||||||||||
setMagazineMode(channel: number, mode: number, cncNodeIndex?: number)
|
||||||||||||||||
|
Set magazine mode Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public setToolDefaultValue | ||||||||||||||||||||
setToolDefaultValue(toolId: number, edgeId: number, field: string, cncNodeIndex?: number)
|
||||||||||||||||||||
|
It updates a tool's field with default value Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public setToolValue | ||||||||||||||||||||||||
setToolValue(toolId: number, edgeId: number, field: string, value: string, cncNodeIndex?: number)
|
||||||||||||||||||||||||
|
It updates a tool's field with provided value Returns a promise. This promise is fulfilled with reply object ServiceResponse return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.
Parameters :
|
| Public transformOffsetWears | |||||||||
transformOffsetWears(data: TransformOffsetWearsData, cncNodeIndex?: number)
|
|||||||||
|
Calculates the tool wears for the position of tha axis that rotates the tool 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.
Parameters :
|