Пример #1
0
int main(int argc, char **argv) {
  config_parser_t parser;
  epos_node_t node;

  config_parser_init(&parser,
    "Start EPOS controller in the selected operation mode",
    "Establish the communication with a connected EPOS device and attempt to "
    "start the controller in the selected operation mode. The controller will "
    "be stopped if SIGINT is received. The communication interface depends "
    "on the momentarily selected alternative of the underlying CANopen "
    "library.");
  epos_node_init_config_parse(&node, &parser, 0, argc, argv,
    config_parser_exit_error);  
  config_parser_destroy(&parser);
  
  signal(SIGINT, epos_signaled);

  epos_node_connect(&node);
  error_exit(&node.error);
  
  epos_control_start(&node.control);
  error_exit(&node.error);
  
  while (!quit);
  
  epos_control_stop(&node.control);
  error_exit(&node.error);
  
  epos_node_disconnect(&node);
  error_exit(&node.error);

  epos_node_destroy(&node);
  return 0;
}
Пример #2
0
void era_motors_position_profile_stop(era_motors_p motors) {
  int i;
  epos_node_p node_a = (epos_node_p)motors;

  for (i = 0; i < sizeof(era_motors_t)/sizeof(epos_node_t); ++i)
    epos_control_stop(&node_a[i].control);
}
Пример #3
0
int epos_position_profile_stop(epos_node_t* node) {
  return epos_control_stop(&node->control);
}
Пример #4
0
int epos_home_stop(epos_node_t* node) {
  if (!epos_device_set_control(&node->dev, EPOS_HOME_CONTROL_HALT))
    epos_control_stop(&node->control);
  
  return node->dev.error.code;
}
Пример #5
0
int epos_velocity_stop(epos_node_p node) {
  return epos_control_stop(&node->control);
}