Hello Guest it is March 28, 2024, 04:00:14 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BIGWING

Pages: « 1 2 3 4 5 6 7 8 »
31
Brains Development / Re: compare immediate not working
« on: June 19, 2015, 01:51:46 PM »
Hi Guys

I have since read that you can't use local variables as inputs or the system locks up (been there)

so I have now tried


input1         no operation          Formulae                           termination

input2         no operation
                                              (A*B*C*D) +v1 + v2         Current Tool DRO
input3         no operation

input4         no operation


where (A*B*C*D) will always be 0 and either v1 or v2 will be zero depending upon turret position



This has not worked either. I can't get the new brain to recognise the local variables V1 and V2


it just outputs 0. How can I transfer variables from one brain to another?



Can anyone shed some light on this?

cheers George

32
Brains Development / Re: compare immediate not working
« on: June 19, 2015, 08:58:23 AM »
Hi Thomas

That's brilliant thanks for that. I need all the help I can get

I have made a bit of progress on the brains

Two things

First          I have noticed that It doesn't appear to like the formulae output

just as an integer. Instead it seems to prefer it in terms of the inputs ABCD

so for each formulae I picked an input that had a 1 value then multiplied it

by the required tool number   ie  for tool 4      A*4   rather  than just 4   etc etc

Second     I came across some guide notes written by poppabear and he states



•   You cant have the same object as an output, follow as an input further down in the same brain and expect it to change condition on a single scan. Brains only does ONE state change per object per scan. (at least that is what I have found). It is hit or miss if your doing it across several Brains then it will depend on execution position and last state wins……..   The only exception to this is Local Vars which appear for all intents and purposes to update locally at that scan, again that is also hit or miss, I have seen it work like that and NOT work like that………go figure……. Keep to the reusing the Output only once as an input in the same brain and you should do OK for the most part.



So I took out the repeated use of current tool dro  tied all the lobes together with an OR command and terminated to a single current tool dro


I did this for both brains ie tools 1 - 4    and tools    5 - 8   and I thought it worked  but just as poppabear predicted both brains are competeing with each

other for priority  sometimes it will work perfectly sometimes it will output 0 for 4 tools.   !!#*@*@*#*!!



Anyway my next train of thought was to change the two termination values for each brain to V1 and V2

 

ie  Current Tool DRO       to  local var  V1   and    local var V2


then write a third brain

local var                                          Formulae                 Termination

V1                 no operation

                                                    ADD  A  +  B             Current Tool DRO

V2                 no operation


ie at any time either A or B will equal 0

but when running this my computer locks up   so it doesn't like something!!!!



So still some work to do.

Hopefully someone else from the forum will jump in with the answer.


Anyway thanks again and enjoy your weekend

cheers George


33
Brains Development / Re: compare immediate not working
« on: June 18, 2015, 01:11:28 PM »
Hi Thomas

Many thanks for all your help and support it really is greatly appreciated.  cheers.


I must admit I am a little disappointed with my first foray into the world of brains.

They seem way more fragile and unpredictable than I thought.

Maybe I need to think again.


Anyway thanks again for all your help

cheers George


34
Brains Development / Re: compare immediate not working
« on: June 18, 2015, 05:54:49 AM »
Hi Thomas

You are right again.

When I split it into two programs it follows the truth table exactly through 1 to 8.

But unfortunately only up to the formulae blocks it still doesn't

actually change the current tool value.

I think I may need to use SetCurrentTool () somewhere. I have been looking

at past threads and it seems possible to call a macro from a brain.

what if I wrote 8 short macros to be called by the brain as required?

Seems a very long winded approach!!!!  What do you think?

Cheers George

ps just for your information

I also tried to rewrite the two brains 1-4  and 5-8  in

my original format ie using immediate compares just

to see if it worked.  But it didn't, it was just the same.

Not to worry we are older and wiser. Well older.

35
Brains Development / Re: compare immediate not working
« on: June 17, 2015, 01:27:35 PM »
Thomas

Just in case you think there may be an issue with my set up.

This is what I've got. The lathe is an emcoturn 120.

Unfortunately I smoked the original emco board so I have tried

to make a replacement. It is just 4 optical switches with a Schmitt

trigger to try to give digital output. ( see photo 1)

The turret internal shaft has a vane trigger to work the switches (see photo 2)

The truth table came from the emco paperwork ( see photo 3)

just in case it helps

cheers George

36
Brains Development / Re: compare immediate not working
« on: June 17, 2015, 12:04:09 PM »
Thanks Thomas that approach works great.

I would never have thought of that myself.    Just  brilliant.

However there is still a couple of problems with the program.

1)  It doesn't seem to like my method of changing the current tool number


ie add   FORMULAE    (tool number)     then terminate    with  TOOL CURRENT  DRO

any thoughts?  and

2) As the turret is rotated the program works totally as expected up to tool number 6

at this point the     AND     block lights up for both 6 7 and 8 ( see attached photo)

the only thing I can think of is maybe it is at this point where I had to use the screen scroll

when writing the program and may be this is causing a glitch.

 I have tried editing the program and then totally writing and new one but the result is the same.

One point I did notice. Input 4 on both blocks tool 7 and tool 8 were very difficult to deselect

ie to get rid of the input 4 green highlight to allow me to highlight the next 4,  column 2  blocks

so I could add the appropriate  AND   function.   (hope that makes sense !!)


cheers George

37
Brains Development / Re: compare immediate not working
« on: June 16, 2015, 11:17:44 AM »
Sorry about that just a typo. Should read.

tool position     1     2     3     4     5     6     7     8

switch 1           1     1     1     1     1     0     0     0
switch 2           1     1     1     0     0     0     1     1
switch 3           1     0     0     0     1     1     1     1
switch 4           0     0     1     1     1     1     1     0


cheers George   


38
Brains Development / compare immediate not working
« on: June 16, 2015, 08:19:47 AM »
Hi Guys

This is my first attempt at a brain so the solution to my problem may be human error and immediately obvious to someone. I hope!!!

I am working on my lathes 8 station tool turret which has 4 optical switches used to detect the current tool.

It's logic uses the following truth table


tool position       1     2     3     4     5     6     7     8

switch    1          1     1     1     1     1     1     1     1
switch    2          1     1     1     0     0     0     1     1
switch    3          1     0     0     0     1     1     1     1
switch    4          0     0     1     1     1     1     1     0

The switches are connected via a pokeys and are referenced to INPUT #1 , INPUT #2, INPUT #3,  INPUT #4

when I rotate the turret the switch signals seem to follow the truth table pattern ok.

These signals are reflected accurately in both the first column of the brain program

(ie input colours  blue/ green  change  to reflect truth table)

the pokeys status page and the mach3 diagnostics page so (I think) the input signals are fine.


(What I want to do is use a brain program (for speed) to set the current tool position then use a

simpler macro to control tool changes.)


The structure for the program is straight forward and I have attached a photo of my layout.

The problem is the second column of the program does not respond to the changes of the inputs.

ie the immediate compare isn't comparing.


More often than not the immediate compare boxes just retain there initial startup value ( ie blue or green)

very occasionally some will change but with an incorrect result.


I am not entirely convinced than my logic is correct

ie  IF   input 1  AND   input     AND   input  3    And   input 4   are correct   then enter tool number into current tool DRO

I am not sure if changing the value in the dro changes the current tool value. I have the feeling that

SetCurrentTool ()  should be employed somewhere  but to simplify the matter and to test the compare function

I have also done a version that removed the last two columns of the program and took out all reference

to current tool and changed it with a simple output 1 .......output8 

this would also have benefit of letting me check the results on the  diagnostics page

but result was just the same.

Any help would be greatly appreciated as I don't know what to try next.

cheers George


ps I don't know if this is normal or not but if I go into program edit then click on the comparison box

the compare immediate is highlighted  but none of the other  3 options are highlighted

ie greater than ,  less than ,  or equal to 

even though the comparison box shows the equal sign  !!!




39
General Mach Discussion / Re: Spindle setup problems
« on: November 28, 2014, 03:16:12 PM »
hopefully here it is

george

40
General Mach Discussion / Re: Spindle setup problems
« on: November 28, 2014, 02:48:37 PM »
I have tried to add a scanned image of my wiring diagram. I clicked on add image
put the path between the two markers. The file size is 940kb Is that too big?

can anyone advise

Pages: « 1 2 3 4 5 6 7 8 »