M68 alternative

  • sdf
  • Topic Author
  • New Member
  • New Member
More
7 years 6 months ago #130098 by sdf
M68 alternative was created by sdf
Is there a way to send a value from a gcode to pyvcp?
I know about M68 but it is limited to only 4 variables, is there any alternative?

Please Log in to join the conversation.

More
7 years 6 months ago #130102 by PCW
Replied by PCW on topic M68 alternative
M68 can use up to 64 variables by setting the "num_aio" parameter when motion is loaded.

( man motion )

Please Log in to join the conversation.

More
7 years 6 months ago #130107 by Todd Zuercher
Replied by Todd Zuercher on topic M68 alternative
Another option is to directly "setp" the value of hal pins (or signals with "sets") with custom M-codes.

Please Log in to join the conversation.

  • sdf
  • Topic Author
  • New Member
  • New Member
More
7 years 6 months ago #130132 by sdf
Replied by sdf on topic M68 alternative

PCW wrote: M68 can use up to 64 variables by setting the "num_aio" parameter when motion is loaded.

( man motion )


Yeah , this is solved the problem.
Code:
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_aio=64

Please Log in to join the conversation.

  • sdf
  • Topic Author
  • New Member
  • New Member
More
7 years 6 months ago #130134 by sdf
Replied by sdf on topic M68 alternative

Todd Zuercher wrote: Another option is to directly "setp" the value of hal pins (or signals with "sets") with custom M-codes.


not sure what do you mean, can you give an example how it is done?

Please Log in to join the conversation.

More
7 years 6 months ago #130154 by Todd Zuercher
Replied by Todd Zuercher on topic M68 alternative
Look at the M100 example here in the documentation.
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m100-m199

That example uses M100PnQnn to set the value of two hal pins equal to n and nn.

Please Log in to join the conversation.

Time to create page: 1.033 seconds
Powered by Kunena Forum