Elmomc Multi-Axis Motion Controller-Maestro Manual de usuario Pagina 268

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 313
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 267
TRACE( "Fin" )
end function
// Heartbeat handler calls then a CAN node state was be changed.
function @hbevent(int busId, int nodeId, int nodeState)
global int work
switch( nodeState )
case( 0 )
TRACE( "Node % : Boot Up State", nodeId )
case( 127 )
TRACE( "Node % : Pre Operation State", nodeId )
case( 5 )
TRACE( "Node % : Operation State", nodeId )
case( 4 )
TRACE( "Node % : Stopped", nodeId )
case( -1 )
TRACE( "Node % : No heartbeat", nodeId )
end switch
work = nodeState
end function
B.4.4 EmitCallback Samples
B.4.4.1 Emit
int go
function run()
global int go
init()
// run conveyer program
switch conv.ps
case -1
// progrma exists
conv.XQ## // run axis program
case -2
TRACE("Error: Conveyer axis has not program!!!")
exit
end switch
conv.ape = 8 // listen emit on PDO 4
home(stamp)
// main program loop
go = -1
while go!=0
until go!=-1
if go == 1
stamp.pr=5000
stamp./jointfilesconvert/1588249/bg
until stamp.ms==0
stamp.pr=-5000
stamp./jointfilesconvert/1588249/bg
until stamp.ms==0
go = -1
end if
end while
end function
// Emit handler calls then a runtime SimplIQ program emit occur.
// Emit handler initialization:
// ape=0x01 for emit(1),
// ape=0x04 for emit(3),
// ape=0x08 for emit(4)
// or any combination: ape=0x04|0x08 for emit(3) and emit(4).
function @emit(int busId, int nodeId, int data)
Maestro Software Manual Appendix B: Sample Programs
MAN-MASSW (Ver. Q)
B-16
Vista de pagina 267
1 2 ... 263 264 265 266 267 268 269 270 271 272 273 ... 312 313

Comentarios a estos manuales

Sin comentarios