File

src/api/model/channel.ts

Description

Class representing a operation channel of the CNC.

Extends

Base

Index

Properties
Methods
Accessors

Constructor

constructor(id: number, channelRaw: any, hmiComm: CommHmiNodeServer, cncKernelType: enums.CncKernelType, cncClientId: number)

Constructor of the class.

Parameters :
Name Type Optional Description
id number No

Logic ID of channel.

channelRaw any No
hmiComm CommHmiNodeServer No
cncKernelType enums.CncKernelType No
cncClientId number No

Properties

Public absId
Type : number
Default value : 0
Decorators :
@Listenable()

absId. Absolute index of the channel. It only differs to logicId in a multi cnc node scenario.

Public activeToolProperties
Type : ActiveToolProperties
Public axes
Type : any
Decorators :
@Listenable()

axes. The references of the model Axis objects which are connected to this channel.

Public axesPosition
Type : number[]
Default value : []
Decorators :
@Listenable()

axesPosition. Array with the logic ids of the axes positions, if zero the position is empty.

Public calibrationServices
Type : calibrationServices
Public cancelContinueServices
Type : CancelContinueServices
Public cncNodeIndex
Type : number
Default value : 0
Decorators :
@Listenable()

cncNodeIndex. Index of the cnc node that belongs to.

Public cncServices
Type : CncServices
Public dmc_fmcservices
Type : dmc_fmcServices
Public ffcservices
Type : ffcServices
Public inspectionServices
Type : InspectionServices
Public logicId
Type : number
Default value : 0
Decorators :
@Listenable()

logicId. The logic id of channel.

Public machineParameterServices
Type : machineParameterServices
Public machiningConditionsProperties
Type : MachiningConditionsProperties
Public masterSpindleIndex
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

masterSpindleIndex. the index of the master spindle

Public mStatus
Type : any
Default value : {}
Decorators :
@Listenable()

Data estructure resolving mstatus_n bit values TODO: define type

Public mStatusHash
Type : string
Decorators :
@Listenable()

Generated hash based on Ms values (for fast change detection)

Public naxes
Type : number
Default value : 0
Decorators :
@Listenable()

naxes. Number of axes of the channel. (array.length)

Public nposition
Type : number
Default value : 0
Decorators :
@Listenable()

nposition. Number of axes of the channel including the empty positions of the yielded axes.

Public nspindles
Type : number
Default value : 0
Decorators :
@Listenable()

nspindles. Number of spindles of the channel.

Public nsposition
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

nsposition. Number of spindles of the channel including the empty positions of the yielded spindles.???? TODO: REVISAR!!!

Public parametersServices
Type : ParametersServices
Public programProperties
Type : ProgramProperties
Public route
Type : string
Default value : ""
Decorators :
@Listenable()

route. Execution route

Public spindles
Type : any
Decorators :
@Listenable()
Public spindlesPosition
Type : number[]
Default value : []
Decorators :
@Listenable()

spindlesPosition. Array with the logic ids of the spindles positions.

Public techTablesProperties
Type : TechTableProperties
Public tofl
Type : Variable[]
Default value : []
Decorators :
@Listenable()

tofl. Array with the tool being prepared. Tool length offset on the axis.

Public toflw
Type : Variable[]
Default value : []
Decorators :
@Listenable()

toflw. Array with the tool being prepared. Tool length offset wear on the axis.

Public zonewarn1
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

zonewarn. Algún eje ha alcanzado el límite de la zona de trabajo. Debería ser un array de integers de 5 valores (por canal hay de 1 a 5 zonas)

Public zonewarn2
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()
Public zonewarn3
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()
Public zonewarn4
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()
Public zonewarn5
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

Methods

Public attachSystemAxes
attachSystemAxes(axes: Axis[])
Parameters :
Name Type Optional
axes Axis[] No
Returns : void
Public attachSystemSpindles
attachSystemSpindles(spindles: Spindle[])
Parameters :
Name Type Optional
spindles Spindle[] No
Returns : void
createListener
createListener(props: Array)

This method will return a custom listener object designed for listening to changes on some concrete properties. Pooling can be avoived, so it can represent a significant better performance.

// Considerer ch is a refence to an Channel Object
const listener1 = ch.createListener(['nspindles','naxes]);

listener1.start((ch, props) => {
console.log(`the number of axes or the number of spindles have changed on channel ${ch.logicId} (within the last 100 ms)`)})
}, { debounceTime: 100 });
Parameters :
Name Type Optional Description
props Array<string> No

Array containing string with current objects propeties (@Listenables) names

Returns : Listener
deleteListener
deleteListener(props: Array)

This method will remove the props listenar from current axis. The Propeties Listener has certain cost and must be un-plugged when is no longer needed.

// Considering previous example
const listener1 = ch.createListener(['nspindles','naxes]);

listener1.start((ch, props) => {
console.log(`the number of axes or the number of spindles have changed on channel ${ch.logicId} (within the last 100 ms)`)})
}, { debounceTime: 100 });

ch.deleteListener(listener1);
// After calling deleteListener "listener1"  will be null.
Parameters :
Name Type Optional Description
props Array<string> No

Array containing string with current objects propeties (@Listenables) names

Returns : void
Public g
g(g: number)

Returns if a G function is active or not. Number of requested G function. the argument (g <0 || g >= this.nGs) is invalid or missing.

Parameters :
Name Type Optional Default value
g number No null
Returns : boolean
Public getAxis
getAxis(payload: string | number, property: "name" | "logicId" | "auto")

Returns axis object by passing the name.CONFLICT (content): Merge conflict in src/api/model/model.ts

Parameters :
Name Type Optional Default value Description
payload string | number No ""

string | number axis logicId or name to be found.

property "name" | "logicId" | "auto" No 'auto'

Which property must be looked up inside the cnc axes colletion. (default: auto; will guess logicId or name)

Returns : any
Public getSpindle
getSpindle(payload: string | number, property: "name" | "logicId" | "index" | "auto")

Returns axis object by passing the name.

Parameters :
Name Type Optional Default value Description
payload string | number No ""

String to match with defined axes.

property "name" | "logicId" | "index" | "auto" No "auto"

Which property must be looked up inside the cnc spindles colletion. (default: auto; will guess logicId or name)

Returns : any
Public isHighLevelInstructionActive
isHighLevelInstructionActive(hli: string)

Returns if a special highLevelInstruction is active or not. (in the map asking for name)

Parameters :
Name Type Optional Default value
hli string No ""
Returns : boolean
Public m
m(m: number)

Returns if a M function is active or not.

Number of requested M function.

Parameters :
Name Type Optional Default value
m number No null
Returns : boolean
Public updateSpindlesInChannel
updateSpindlesInChannel()

Will update this.spindles array based on theirs positions. spindlePositionHash will be updated

Returns : void

Accessors

nGs
getnGs()

Number of G functions

Returns : number
nMs
getnMs()

Number of M functions

Returns : number[]
axesNames
getaxesNames()

List of the names of the channel's axes

Returns : string[]
spindlesNames
getspindlesNames()

List of the names of the channel's spindles

Returns : string[]

results matching ""

    No results matching ""