M68 alternative
01 Apr 2019 14:37 #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?
I know about M68 but it is limited to only 4 variables, is there any alternative?
Please Log in or Create an account to join the conversation.
01 Apr 2019 15:06 - 01 Apr 2019 15:07 #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 )
( man motion )
Last edit: 01 Apr 2019 15:07 by PCW.
The following user(s) said Thank You: sdf
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Boarder
-
Less
More
- Posts: 3812
- Karma: 148
- Thank you received: 770
01 Apr 2019 15:47 #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 or Create an account to join the conversation.
02 Apr 2019 04:54 #130132
by sdf
Yeah , this is solved the problem.
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.
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 or Create an account to join the conversation.
02 Apr 2019 04:55 #130134
by sdf
not sure what do you mean, can you give an example how it is done?
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 or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Boarder
-
Less
More
- Posts: 3812
- Karma: 148
- Thank you received: 770
02 Apr 2019 12:54 #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.
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 or Create an account to join the conversation.
Time to create page: 0.126 seconds