File

src/api/interface/toolsAndMagazineServices.ts

Description

Class that provides generic services for cnc tools and magazines manipulation.

Extends

EventEmitter

Index

Methods

Constructor

constructor(hmiComm: CommHmiNodeServer, route: string)
Parameters :
Name Type Optional
hmiComm CommHmiNodeServer No
route string No

Methods

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.

Parameters :
Name Type Optional
magazine number No
file string No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
folder string No
cncNodeIndex number Yes
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 :
Name Type Optional Description
file string No

File where service will save tools configuration.

cncNodeIndex number Yes
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 :
Name Type Optional
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional Description
id number No

Id of the tool

cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
position number No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
position number No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional Description
magazine number No

Magazine id

cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional Description
magazine number No

Magazine id

cncNodeIndex number Yes
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.

Parameters :
Name Type Optional Description
magazine number No

Magazine id

cncNodeIndex number Yes
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 :
Name Type Optional Description
toolId number No

Id of the tool

edgeId number No

Id of the edge

cncNodeIndex number Yes
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 :
Name Type Optional Description
id number No

Id of the tool

return object will contain the returnCode, if value is 0 everything went well, if not data will have the explanation of the error.

cncNodeIndex number Yes
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 :
Name Type Optional
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
id number No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
id number No
cncNodeIndex number Yes
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 :
Name Type Optional
magazine number No
id number No
position number No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
id number No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
magazine number No
file string No
cncNodeIndex number Yes
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.

Parameters :
Name Type Optional
folder string No
cncNodeIndex number Yes
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 :
Name Type Optional Description
file string No

File from service will read tools configuration.

initializeMagazines boolean No
cncNodeIndex number Yes
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 :
Name Type Optional Description
channel number No

Logic if of the channel

id number No

Tool id

cncNodeIndex number Yes
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 :
Name Type Optional Description
channel number No

Logic if of the channel

mode number No

Magazine mode

cncNodeIndex number Yes
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 :
Name Type Optional Description
toolId number No

Id of the tool

edgeId number No

Id of the edge

field string No

Name of the field to modify

cncNodeIndex number Yes
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 :
Name Type Optional Description
toolId number No

Id of the tool

edgeId number No

Id of the edge

field string No

Name of the field to modify

value string No
cncNodeIndex number Yes
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 :
Name Type Optional
data TransformOffsetWearsData No
cncNodeIndex number Yes

results matching ""

    No results matching ""