- Hardware & Machines
- CNC Machines
- Turning
- Small victory in the war against the Cincinnati cinturn 12u
Small victory in the war against the Cincinnati cinturn 12u
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
I added the motion in digital line I am now getting the following error.
in Axis
Error: Index out of range, 5 not in [0..4] increase num_dio/EMCOT_MAX DIO=64)
turret motion is happening now, I am still getting failure to lock, due to what looks like a abort. I am attaching all of my current config files in in the zipped folder are the halscope captures of what's happening.
I've been googling on this for a bit now, and so far there nothing that should be causing emcio enumarated input failure, that I understand.
Please Log in or Create an account to join the conversation.
You change this, as the error message suggests, by adding a num_dio=6 (or whatever) parameter to the "loadrt motmod" command in the HAL.
In your case the HAL file is using INI substitution so you have
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
Change that to
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_dio=8
Or, if you want, you could create a new NUM_DIO in the [EMCMOT[ section of the INI and use:
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_dio=[EMCMOT]NUM_DIO
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
Just so I understand exactly WHAT I am changing for the future
Please Log in or Create an account to join the conversation.
- tommylight
-
- Offline
- Moderator
-
- Posts: 18562
- Thank you received: 6218
num_dio=8 at the end of the line
num_dio ==== number of digital inputs and outputs
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
as soon as I added the num_dio=8 after my first turret move, same error, this time 16
ERROR: index out of range, 15 not in [0..10[ (increase num_dio/EMCOT_MAX=64
and still ignoring my dwell command in the gcode to stop the motor and wait before locking the turret. Why does this work in the vismach sim but fail on my machine, which afaict is configured exactly the same way ???
M66 P0 L3 Q60 ; wait for carousel finished
M65 P0; stop carousel
should I change my current m64 g4 p5 to
M66 P1 L3 Q5 instead ?I keep getting locking failure because the motor keeps overshooting turret position.
Please Log in or Create an account to join the conversation.
well, for sure, that's not the issue. I am not sure entirely why but the conv-float-32u seems to be adding joints everytime you move the turret.
I don't know what you mean by "adding joints".
ERROR: index out of range, 15 not in [0..10[ (increase num_dio/EMCOT_MAX=64
still ignoring my dwell command in the gcode to stop the motor and wait before locking the turret.
You seem to be combining G4 Pnn and M64/M65/M66 Pnn which seems to be having odd results.
I can see that the interpreter would be confused about this as it can't really tell whether the P is a length of pause or a digital output number.
Put the G4 Pnn on one line and the M65 Pnn on a different line (same for M66)
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
all of this is odd, these changes work in vismach sim, so either the sim is excessively fault tolerant, and that makes it useless for prototyping or I've stumbled onto some sort of failure mode that's not obvious
i did increase the num_dio to 64, just for shits and giggles, still getting errors, given the random numbers, it's probably some connection to float I'm to inexperienced to see.
Please Log in or Create an account to join the conversation.
Are you sure the G4 is in the right place in the file?
Forget conv_float_s32 that has nothing at all to do with the error being reported.
It is saying that you are trying to access a DIO with an index higher than exists.
ie, somewhere there is a P-number that is too large in a DIO command.
This could happen if you have munged together a G4 P60 and an M66 P2 (for example) . The P-parameter is needed in both cases, but refers to different things.
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
- Posts: 660
- Thank you received: 113
Here is the clean up version of my ngc file, I am hoping that adding this line should create the pause. I have no IDEA why in vismach sim the g4 pxx commands work, but on my real hardware, they are ignored, every place I put them to slow the motion down.
M66 P0 L2 Q2 <
this line here should pause the machine for at least 2 seconds, m66 dio wait on input, p0 being the digital output we are watching, l2 going low from carousel and q2 is the hold time. after the wait time, the program should go back to executing.
If you see an error here, please highlight it in your reply.
o<toolchange> sub
; only unload the tool if there is a tool in the spindle
; This assumes that the carousel is already aligned correctly.
; It is important to unload the tool before shutting down the machine.
G53 G0 X16.00
O100 IF [#<selected_tool> GT 0]
M65 P1 ; unlock carousel
M66 P1 L4 Q1 ; wait for locked=false
O106 if [#5399 LT 0]
(abort, failed to unlock carousel)
O106 endif
M68 E0 Q#<selected_pocket> ;set the carousel to move to the right pocket
M64 P0 ; start carousel
M66 P0 L3 Q60 ; wait for carousel finished
M65 P0; stop carousel
M66 P0 L2 Q2 <
this line here should pause the machine for at least 2 seconds, m66 dio wait on input, p0 being the digital output we are watching, l2 going low from carousel and q2 is the hold time. after the wait time, the program should go back to executing.
M64 P1 ; lock carousel
M66 P1 L3 Q1 ; wait for locked=true
O108 if [#5399 LT 0]
(abort, failed to lock carousel)
O108 endif
O100 ENDIF
o<toolchange> endsub [1]
M2
Please Log in or Create an account to join the conversation.
IF Gcode it executed top to bottom left to right, the g4 pxxx is in the proper place, HOWEVER, the interpreter continues to ignore it. I did have a few M commands munged together.
G-code does read top to bottom but not left to right. Each command has a priority and those with highest priority on a single line run first. (so, for example, S100 runs before M3)
M66 P0 L2 Q2 <
this line here should pause the machine for at least 2 seconds
It will pause for at _most_ 2 seconds, and for no time at all if input 0 is already low when it gets there.
If it takes more than 2 seconds for the pin value to be low, then a flag will be set in #5399
If you want an actual pause then use a G4 on a line by itself.
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- CNC Machines
- Turning
- Small victory in the war against the Cincinnati cinturn 12u