Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: PeterF on January 03, 2014, 06:10:18 PM

Title: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 03, 2014, 06:10:18 PM
I too cannot disable rotational soft limits. The check box Rotational Soft Limits from Config/General Logic/Rotational pane goes into the XML as ROTSOFT, but Mach3 regardless of the checkbox and ROTSOFT, does soft limits on A. I went thru all the ~12 posts here about the rotational soft limit issue. On some posts, the checkbox Rotational Soft Limits seems to work, on other posts it does not work.

My Mach3 for this issue is versions R3.042.033, R3.042.038, R3.042.040  and R3.043.066. I also did the usual things with the XML: removed ROTSOFT, added RotSoft, varied every conceivable parameter in the Config menus, without any result. This is a test system without actual CNC, even without parallel port. The PROFILE is attached. We need Soft Limits turned on for the X Y Z axes.

Of course I can do infinity limits on A, up to +36500000.00, -36500000.00  (five zeros, a hundred thousand turns). But six zeros are too much, giving a Max<Min status message.

I thank you in advance for help.

Peter.
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 03, 2014, 07:27:25 PM
Rotational soft limits are disabled in that xml and I also jogged the A right up to 360 and it rolled over so that confirmed to me they are not enabled.
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 04, 2014, 04:47:51 AM
Hood,

The soft limits are in that XML:
X: 279;-1
Y: 130;-1
Z: +1;-265
A: 365;-5

The home (reference) positions are:
X: -5
Y: -5
Z:+5
A: 0

Rotational Soft Limits are unchecked.

Did you try to rollover from 360 up to 365 and more in the 4th axis? Did you try to roll over from 0 down to 355 and less, and soft limits did not fire on your Mach3?

(When you try and are at the reference positions, you have first to move away in X, Y, and Z and only then turn on Soft Limits. At the reference position, X Y and Z would fire soft limits) Thanks in advance for your help.

Peter.
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 04, 2014, 05:07:09 AM
Why you would have a home off value of -5(X and Y) 5 (Z)  I am unclear as basically that is telling Mach to set the machine coords 5 units past  zero,  but I am sure you have your reasons ;)
In any case it makes no difference here, soft limits are not active for the A axis, I can jog right round as many times as I wish.
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 04, 2014, 08:26:30 AM
A) The coordinate reasons are these:
the operator moves safely, in machine coordinates, in X, from around 0 to around 278.
the soft limits are -1 and 279.
the end switches are at -5 and at 285.

The soft limits are within the end switch hard limits.

Main reason: Machine coordinate zero is defined, it is within the soft limits and within the end switches. It is useful to have a GOTO MACHINE ZERO button, and we do have it.

The distances between the end switches, soft limits and machine coordinate 0 are a bit arbitrary, admittedly. (at the lower X for example: -5; -1; 0).

B) Why can you roll around in A, and I cannot? I do not have the driver installed, makes this the difference?
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 04, 2014, 08:50:34 AM
Video here, I changed 3 things in your xml, first was the screenset as yours is a custom one and I dont have it. Second was the port addresses as the ones you have made my computer hang for a bit then trip the driver watchdog. Third, halfway through the video I changed the Velocity of the A axis to speed things up a bit for the video.
BTW just in case you wonder why the DROs look a bit jumpy it is just because of the capture rate of the screencaptur software.

http://www.youtube.com/watch?v=M940DUbuvDA&feature=youtu.be

Regarding your softlimits, I personally do not see a reason for having it set the way you do. If you have Home Off as zero and Min as Zero and you adjust the slow zone correctly then you should never be able to hit a limit switch by jogging onto it. Reason being is when homing Mach will move the axis onto the switch and then back off again. When the switch closes that is the position that is set as machine zero. So if you jog towards that switch the softlimits should stop you exactly at zero, ie the position the switch closed at, you should not be able to move past that position and hit the switch. If you do not have the slow zone set correctly then it may be possible for you to overshoot, so set that correctly and all will be fine.
 The way you have things set up means to home the machine softlimits need disabled, this then means that after homing you need to jog a bit before you can then enable them, if you are concerned about the operator not doing things correctly (as your previious post would suggest) then not having to first disable then next remember to enable, after a jog, would be safer in my opinion. Obviously thats just my opinion though ;)
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 04, 2014, 08:59:18 AM
The way you have things set up means to home the machine softlimits need disabled, this then means that after homing you need to jog a bit before you can then enable them, if you are concerned about the operator not doing things correctly (as your previious post would suggest) then not having to first disable then next remember to enable, after a jog, would be safer in my opinion. Obviously thats just my opinion though ;)
Hood
Yes, your observations are right. For this I did Goto Machine Zero, and then turn Soft Limits on. And we have margin when turning the jog wheel (MPG on the second port) in the wrong direction at the reference position. It is also safer for me, as the IT people. The CNC is 100km from me.

The 4th axis video I look at it later this evening.
Peter
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 04, 2014, 09:27:52 AM
Hood, what is your version of Mach3? I will then do a clean install of the same version.
Peter.

+ do you have the driver installed at home (the video computer)?
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 04, 2014, 09:35:03 AM
Not sure exactly what version I have on that machine, it is the home one and I am now at the workshop, I will look when I get home in a few hours.


Regarding the soft limits, if that is the way you feel is safest then you would be better making it foolproof.
To do that you would edit the VB in the RefAll button, have it first disable Soft Limits, next have it home the Z axis and then move the axis the distance required, then Y then X, again having them move the required distance, then finally have it re-enable soft limits.
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: cncalex on January 04, 2014, 09:56:53 AM
Hi all,
sorry when I enter this thread.
So far as I remember there is still a glitch in Mach and rotational Soft Limits.
I think that was discussed before in the forum. I put in  +-999999999999 in Homing/Limits for the A axis and its fine.
Note that Mach is counting and saving the G53 position when the axis is not referenced. You may reach the limit one day.
Just a thought.

Alex
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 04, 2014, 10:24:22 AM
He is, as far as I understand, homing the axes.
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 04, 2014, 11:47:25 AM
Hood, what is your version of Mach3? I will then do a clean install of the same version.
Peter.

+ do you have the driver installed at home (the video computer)?

It is 062 here.
 I have just noticed your edit, I do have the driver installed as some things do not work correctly if you use in Simulation mode. Having the driver installed does not mean you have to have a printer port on the computer, so I always install it unless it is on a machine where I will be solely using an external controller.
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 04, 2014, 11:52:10 AM
I have also just tried with 066 which I see you used and again it works fine, going back to 062 though as 066 has issues ;)
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 04, 2014, 12:29:19 PM
Hi all,
sorry when I enter this thread.
So far as I remember there is still a glitch in Mach and rotational Soft Limits.
I think that was discussed before in the forum. I put in  +-999999999999 in Homing/Limits for the A axis and its fine.
Note that Mach is counting and saving the G53 position when the axis is not referenced. You may reach the limit one day.
Just a thought.

Alex
For some people, Rotational Soft Limits Unchecked is honored, for others - not.  See the video of Hood.

The axis A is referenced on my system, but I will see what changes, when only X Y Z are referenced, and A is not referenced. Thanks for the hint.
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 04, 2014, 12:34:12 PM
Regarding the soft limits, if that is the way you feel is safest then you would be better making it foolproof.
To do that you would edit the VB in the RefAll button, have it first disable Soft Limits, next have it home the Z axis and then move the axis the distance required, then Y then X, again having them move the required distance, then finally have it re-enable soft limits.
Hood
I consider augmenting your proposal to the ZERO ALL button (as is it named in my screen layout, which is a slightly modified SIEG.set, which in turn is probably based on a very old version of 1024.set).
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 04, 2014, 01:14:10 PM
I shall verify that the Soft Limiit button on my "old" screen is the same as the current Soft Limit button, perhaps it is now a OEMButton.
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: cncalex on January 04, 2014, 01:16:43 PM
short update from here.
Tested some things and as Hood says no problems here in .062 and Printer Port but still problems by using the SmoothStepper
so it is the SS Plugin with the glitch.

Alex

Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 04, 2014, 03:23:01 PM
Just tried with Peters profile and a SS (V17-D plugin) and its fine.
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 04, 2014, 04:18:10 PM
It does oviously not depend on the Mach version, and I could not do a clean install yet, or vary my other circumstances.

Here is my current screen set (attached), and it refers to the plain MillBitmaps. Maybe the screen set contents makes the difference. Can you try it, please, Hood?

Maybe soft limits on A are handled by the driver... there is another option, M5 macro command that works only with the driver.

I'm running on a Windows 8 32 bit, on a virtual computer, and I doesn't install the driver. I do have the option of a virtual Windows 7 32 bit. The host is a Windows 8 / Windows 8.1 64 bit Intel i7.

Peter.
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 04, 2014, 05:09:13 PM
Ok now that I know that I would say that is almost certainly your problem. With a 64bit OS you can not run the PP driver and as such you are in Simulate mode and as said previously things often dont run right in sim mode. I will go and try your profile in sim mode and report back.
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 04, 2014, 05:14:00 PM
Yes that is your problem, when I put Mach in Sim mode I get the same issue.
I would say you would just get the same problems with a virtual W7 as well as the Mach driver will not work.
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 04, 2014, 11:26:17 PM
Mach3 R3.043.062 with driver installed well in Windows 7 32 bit. (And it honors the Rotational Soft Limits checkbox and Soft Limits). This is the same "hardware" (VMware), as for Windows 8 32 bit. Without parallel port. I applied the vista patch beforehand.

On Windows 8 32bit, the driver causes "Windows runs into a problem" (or similar, message disappears quickly) and Windows does a Restore operation. When I allowed unsigned drivers (five steps from the Charms Bar), it does show the message at the next boot after installation. When I did not allow unsigned drivers, the message shows at the parallel port step during Mach3 install. I extracted the driver from Windows 7 and installed it manually on Windows 8, but with the same failure. We have to wait for a patch to arrive.

For my sample rotational piece, found in the internet, the 4th axis limits on page 4 "Tool Path" are -169200 and +16, meaning 470 turns. It is viable to enter large positive and negative soft limits, and knowing, how many turns are to be expected, e.g. (36500000;-36500000) for hundred thousand turns. In Mach3 R3.043.062 the maximum liimit values are even +/-1 with 17 zeroes, but in earlier versions it was lower.

It is manageable, and I'm grateful to Hood for relating it to the driver installation.

Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 05, 2014, 02:43:59 PM
On Windows8 32 bit, installation of the driver is possible from DriverTest when I disable UAC. It works then as expected (Driver initalized, Rotational Soft Limits checkbox honored, DriverTest runs to completion). However on the next restart Windows8 diagnoses a problem and proposes to Restore. I do have ApplicationCompatibilityToolkit from Microsoft, to be tried next.

I was startled as DriverTest dates from 2010. However the actual driver files are separate and present in the Mach3 folder.
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 05, 2014, 07:44:17 PM
Regarding the soft limits, if that is the way you feel is safest then you would be better making it foolproof.
To do that you would edit the VB in the RefAll button, have it first disable Soft Limits, next have it home the Z axis and then move the axis the distance required, then Y then X, again having them move the required distance, then finally have it re-enable soft limits.
Hood

a) How do I wait for VB script steps to complete?
Between referencing, and moving to Machine Zero, I need a pause. Between moving to Machine Zero, and turning Soft Limits on, I need a pause. I remember that I have seen it, but can't recall where it is. Right now, without CNC, I put in adequate sleep, say sleep (1000).

Thanks for helping me.

b) The soft limits on A cannot substantially exceed (+36500000;-36500000). Outside of this, sometimes Mach3 complains from the Homing/Limits dialog, sometimes later when I toggle Soft Limits on.

Peter.

Code: [Select]
'PF 05jan2014

If(GetOEMLED(23)=True) Then
'MsgBox "soft limits are on"
DoOEMButton(1029) 'toggle soft limits OFF if soft limits are On.
Else
'MsgBox "soft limits are off"
end if


DoOEMButton(179) 'machine coordinates, (180) work coords

sleep(500)

DoButton( 24 ) 'Ref Z
DoButton( 23 ) 'Ref Y
DoButton( 22 ) 'Ref X
DoButton( 25 ) 'Ref A

Sleep( 500 ) ' ??
'DoButton( 7 )  ' ?? zero all

Code "G0 G53 Z0." 'goto mach zero,first Z, then X Y, then A
Code "G0 G53 X0 Y0."
Code "G0 G53 A0"

Sleep(2000)

DoOEMButton(1029) 'toggle soft limits ON

DoOEMButton(180) 'work coordinates
                

Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 06, 2014, 02:55:29 AM
While IsMoving()
Wend


BTW not sure why you are changing to machine coords with the OEM button, you dont have to do that but maybe it is just something you want to do.
Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 06, 2014, 04:51:37 AM
While IsMoving()
Wend


BTW not sure why you are changing to machine coords with the OEM button, you dont have to do that but maybe it is just something you want to do.
Hood


Would  it be advisable to have a delay in the loop, and a time out? Sort of:

Code: [Select]
I=0
' syntax to be fixed, kind of pseudocode
now=MilliSeconds
While IsMoving() and I<1000 and MilliSeconds <start+60000
Sleep(333)
I=I+1
Wend

Machine coordinates: a) just to learn how to program it, b) I did not grasp the difference between OEMButton 180 ("with G92") and 181 ("without G92") c) to get feedback about the actual machine movement d) to leave it in the right coordinate display machine/work coords after referencing
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 06, 2014, 06:21:58 AM
Hood, I leave the coordinate display mode untouched, it is better.
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: Hood on January 06, 2014, 07:13:03 AM
Not really sure why you would need a timeout.


Hood
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 06, 2014, 08:43:10 AM
The script should not hammer in a tight loop, but release the CPU to Mach3 while Mach3 is doing the move. And I wait beforehand, and in every wait loop, to ensure movement has begun. Movement could be in different thread.

Current script is:
Code: [Select]
'PF 05jan2014

'reference all axes Z X Y A (move to home switch, then set machine coords to home coords)
'move to machine zero
'turn on Soft Limits
'set coordinates to Machine / Work / leave as is* (see below)

Do
  Sleep ( 333 )
Loop While IsMoving()

' programming note: wait by documentation is following
'While IsMoving()
'Wend

' programming note: Until Not does not wait, for unknown reason
'Do
'  Sleep  (333 )
'Loop Until Not IsMoving()


If(GetOEMLED( 23 )=True) Then DoOEMButton( 1029 ) 'toggle soft limits OFF if soft limits are On.

'DoOEMButton( 179 ) 'machine coordinates, ( 180 ) work coords

Do
  Sleep ( 333 )
Loop While IsMoving()

DoButton( 24 ) 'Ref Z
DoButton( 23 ) 'Ref Y
DoButton( 22 ) 'Ref X
DoButton( 25 ) 'Ref A

Do
  Sleep ( 333 )
Loop While IsMoving()

Call Code ( "G0 G53 Z0.") 'goto mach zero,first Z, then X Y, then A
Call Code  ("G0 G53 X0 Y0." )
Call Code ( "G0 G53 A0" )

Do
  Sleep ( 333 )
Loop While IsMoving()

DoOEMButton( 1029 ) 'toggle soft limits ON

'DoOEMButton( 180 ) 'work coordinates

Do
  Sleep ( 333 )
Loop While IsMoving()

'end of script
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 12, 2014, 06:05:33 AM
Last week I could look at our productive system, Windows XP, driver installed, Mach3 R3.043.062. There the Rotational Soft Limits checkbox got ignored. Soft limits on the A axis fired anyway. Of course we do not have Limit Switch signals in Ports and Pins. 

I set the soft limits to +36500000;-36500000 to cure the situation.
Maybe I should activate A+ A- signals, leaving them on Port 0 Pin 0?
(A Home must not be activated, because then Reference A would turn forever.)
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 12, 2014, 06:10:37 PM
I found a few things:
- The soft limit is actually handled in steps, with the range 2^31-1; -(2^31-1)
- the maximum in units is then (2^31-1) divided by "steps per".
(2^31-1 is 2147'483'647, or for simplicity 2147'000'000 a bit less.)

My example:
- 80'000 steps per revolution of 360 degrees (40:1 gear)
- 222.2222222 "steps per", steps per degree
- maximum soft limit is +9'663'676.412;-9'663'676.412, respectively +9'663'676;-9'663'676 , respectively +9'661'500; -9'661'500.
- maximum limit in revolutions is 26'843 revolutions of 360 degrees in the positive or negative direction. Respectively 26837 revolutions.
(The latter values are from the above mentioned 2147'000'000 maximum steps.)

Notes:
- Mach3 does its positioning in steps in signed 32-bit values. The DRO positions are calculated on the fly from the steps and "steps per". We see this, when we change "steps per" in the motor tuning.
- When values are entered as soft limits, higher than those calculated from 2^31-1, they make overflow into negative or arbitrary values, which is not always noticed by Mach3.
- I do not yet know what is the required precision of fractional "steps by" values. Obviously Mach3 truncates them to 10 digits.
- Of course these large values are only a problem with rotational axes (because they can rotate many times, far in steps), not with linear ones (that have limited travel in steps).
Title: Re: Rotational Soft Limits on A axis, once more, cannot be disabled.
Post by: PeterF on January 14, 2014, 07:17:47 AM
Surprise on Exiting Mach3: The values are saved not as entered, but rounded Up.  In one profile, I entered +9'661'500; -9'661'500 (from  2147'000'000). It gets saved as +9'662'000;-9'662'000 (<M3Max>9.662e+006</M3Max>). In another profile (mine, the IT), I entered +9'663'676;-9'663'676 (exact max values). It gets saved as +9'664'000;-9'664'000. On next launch of Mach3, I access Limits/Homing, and close it, it says Limit Max<Min. obviously 9'664'000 is over the exact maximum..

before exiting Mach3, the values are used as entered. On the next launch, the saved rounded up values are used.

Peter.

PS My sample milling layout from  see picture (http://www.cambam.co.uk/forum/index.php?topic=2017.msg11889#msg11889)  is 470 turns. With a maximum of 26838 turns before soft limits, we could produce 57 pieces without re-zeroing.