Hello Guest it is April 19, 2024, 08:11:12 PM

Author Topic: TOOL changer problems after update  (Read 3360 times)

0 Members and 1 Guest are viewing this topic.

Re: TOOL changer problems after update
« Reply #10 on: July 27, 2019, 05:12:50 AM »
Hi,

Quote
-28 MERROR_IPC_NOT_READY        The Interprocess Communication subsystem is not ready.

What API resulted in this code?

I noted that in your previous post you had a command:
mc.mcSignalWait(inst,mc.ISIG_INPUT7 ,1,0)

This allows for a time out period of 0??? Is that what you meant. If you are going to wait for a signal you should have
some time frame in mind.....a few milliseconds even??

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: TOOL changer problems after update
« Reply #11 on: July 27, 2019, 05:31:30 AM »
Hi it is this that it terminates the program
mc.mcSignalWait(inst,mc.ISIG_INPUT7 ,1,0)
But I also tried
mc.mcSignalWait(inst,mc.ISIG_INPUT7 ,1,4)

it then terminates  with a error -40 a time out error so I believe  there is some thing wrong with the way it gets the input  or actiually fails to get the input
I copied the machipc.dll from the version of mach4 where is works but it made no difference I have now put back the correct machipc.dll  they are 2 different date stamps and file sizes
Regards Ray
Re: TOOL changer problems after update
« Reply #12 on: July 27, 2019, 07:53:07 AM »
Hi,
so you extended the time out period to 4 milliseconds??? Can you be sure that a signal operates in that time frame?
Why not extend it to 1000 milliseconds and see what happens.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: TOOL changer problems after update
« Reply #13 on: July 27, 2019, 12:51:22 PM »
The wait period must be larger than the minimum time it will take your motion device to receive, process and return it. 4 is not enough.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: TOOL changer problems after update
« Reply #14 on: July 27, 2019, 08:02:07 PM »
Hi
I set it to 4 seconds not milliseconds and setting it to zero means it will wait for ever until a signal arrives
it now waits 4 seconds the mach4 program terminates and  the message box pops up with error -40 as the  command has waited its 4 seconds and  then drops out as it should but with  or with out a signal it should not terminate the mach4 program
I need it set to zero and this worked fine in 3804 version  I do not want tool changes happening unless the tool door is
open
I went into diagnostics and can operate the door and see the input signal come on and off
I am not sure where to go  there is probable another command I could use or I may start looking in ESS set up and see if some thing there effects a error -28
any thoughts and idea to test are more than welcome
Re: TOOL changer problems after update
« Reply #15 on: July 27, 2019, 08:09:14 PM »
Hi,

Quote
then drops out as it should but with  or with out a signal it should not terminate the mach4 program

What would you expect Mach to do? You have asked it to wait on a signal, if the signal has not occurred within a specified time
what should Mach do?

You may note than in my thumbnail sketch of testing for return codes that on detection of a fault:

if rc== -40 then
         wx.wxMessageBoox('Function failed-timed out')
         return
end

Note in particular the <return> command. That should terminate the macro gracefully. Unless you give Mach such an alternative
what is it supposed to do next when an expected signal does not materialize?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: TOOL changer problems after update
« Reply #16 on: July 27, 2019, 08:17:20 PM »
With version 3804
  if I put say a 2 second delay in and  if the signal did not arrive in that time it would run  down the script    to the next command which in my case was to  raise the tools loading bar and  operate that output
  I did not have any error message etc installed in the script as I set it to zero so it would wait until the door opens
The program did not just disappear of the screen and need to be reloaded each time as is does now
the error -28 I will set the program to 10 seconds delay and take the lid of the control so I can see ESS I think it has a led for the inputs and can then confirm the input is on in diagnostic it certainly comes on
 
Specifying 0 for timeoutSecs will wait indefinitely until the signal changes state. Decimals are allowed. e.g. .5 is half of a second.)
 
This is the advice on the delay and from looking at it when I set it for 4 seconds it seems to take about that long
« Last Edit: July 27, 2019, 08:30:21 PM by Raymondo »
Re: TOOL changer problems after update
« Reply #17 on: July 27, 2019, 08:39:19 PM »
I had a bit of a think and I can turn that input on check it is on in diagnostic  then run the signalwait command  also the second last digit determines if it accepts a high or low signal I will try that both ways as well
It might show some light on the problem
Though it was all working fine till the update
It is sunday morning here so will not be at the factory till tomorrow

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: TOOL changer problems after update
« Reply #18 on: July 27, 2019, 09:14:44 PM »
Try updating to the latest development version.

ftp://anonymous:guest@ftp.machsupport.com/Mach4/DevlopmentVersions/Mach4Hobby_Installer-4.2.0.4261.exe

Let me know if it helps please.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: TOOL changer problems after update
« Reply #19 on: July 29, 2019, 02:30:06 AM »
Hi
we have the tool changer working again  Whoo Hooo  but after a lot of testing and playing  around with ver 4261
But I believe there is still a bug

 mc.mcSignalWait(inst,mc.ISIG_INPUT7 ,1,60)
  I now use this and it works if a signal comes within the 60 seconds    but  the description for use says

Specifying 0 for timeoutSecs will wait indefinitely until the signal changes state. Decimals are allowed. e.g. .5 is half of a second.)

 Using  mc.mcSignalWait(inst,mc.ISIG_INPUT7 ,1,0)  this did work as described in the 3804 ver now it will cause Mach4 to crash even if there is a signal there before call or after the command it does not matter using the command this way it  will crash mach4 every time

just another question if I use this

if rc== -40 then
         wx.wxMessageBox('Function failed-timed out')
         return
end
just where does it return to ? does it just exit the m6 function ?

 I would like it to return to a function where I can close tool doors retract they tool etc and exit the tool change nicely
Regard Ray