Hello Guest it is April 27, 2024, 09:12:02 AM

Author Topic: Chainsaw mill project with mach 3  (Read 486 times)

0 Members and 1 Guest are viewing this topic.

Chainsaw mill project with mach 3
« on: November 29, 2023, 04:10:19 PM »
I have made some custom screensets before on a chop saw and my fully automated tablesaw.
These projects has been pretty much just screeset layout, but i also got some great help from TPS du make me some wizards for fingejoint and dado actions.

However now I am up for another challenge.
I want to automate my electric chainsawmill that has a vfd on the chainsaw and a vfd on the feedmotor. , so I am going to build a pretty simple Screenset with primarily start saw forward (starting the chainsaw and feed , if I get the brains coding to work)
Is also should display the motorload in a DRO
I have the layout and functions pretty much laid out in my mind, but I have a question on cutom (OEM) button using machscreen screen designer by klaus.

I am looking for at least 2 momentary buttons, and I am having trouble finding some usable in the list. (The run button works as a momentary button and can be used)

BUT am I missing something here?  Is it possible to define custom buttons in screendesigner that can be picked up as inputs in Brains?

Best regards
Roy

Best regards
Roy

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Chainsaw mill project with mach 3
« Reply #1 on: November 30, 2023, 07:12:53 AM »
hello Roy, as i wrote in your other Thread, i would use UserLED's (from 1000-2254) to "interact"
with brains.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Chainsaw mill project with mach 3
« Reply #2 on: November 30, 2023, 10:05:13 AM »
Hello Thomas
Its ben a long time, hope all is good: :)
Thank you for your reply.
As you might remember, VB an "STL" kind of coding is not my "language" of choice, I am more  ladder kind of guy:)

I will look for the macro modbus info, and also pick up some of the basic screendesigner tricks using custom leds and so on.
Its been a long time since we did the tablesaw project, which is still in use today btw, and some of the basics have been left in the dust:)

Best regards
Roy

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Chainsaw mill project with mach 3
« Reply #3 on: November 30, 2023, 10:24:20 AM »
Hello Roy,
yes everything fine here so far, hope so on your side.
btw. witch motion controler will you use?
might be the easier way to control the two vdf's "manually".
jears ago i played arround with modbus and arduino but was never
able to get it very stable to work.

Regads Thomas 
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Chainsaw mill project with mach 3
« Reply #4 on: November 30, 2023, 03:33:08 PM »
Sweet.All is good here as well
I am not planning on using a motion controller, just modbus communication to the two drives.
The feed drive and the saw drive is working together in kind of a "closed loop" as the torque output of the chainsaw drive feeds the feed drive analogue 0-10v input.
This is how I run things now, with just regular I/O on the drives.
But one of the main issues is that to get the ideal feed speed/working area for the feed motor I have to work between 12-20hz.
The 4.5 meter cut normally takes approx 60-90 seconds for the 4 meter log, depending on the size, and that means that the saw take the same to drive back to start position.
This means to much waiting time between cuts, so that is why I need to set the HSP to 120 hz for the reverse action.
The only 2 I/O s needed are limit switches, And I plan to pick these up via modbus bits.
I have benchtested all the functions and I can read and write without any issues this far.

My Initial thought was to use a 12" Magelis HMI that i had salvaged, but I do not own a license for vijeodesigner, and I also do not know how to use it, that is why I decied to use Mach.

It is also easy to get a cool looking interface.
Later I hope to add features to set log height and board thickness from the screen using linear actuators, so this could evolve:)

Just started exploring the use of OpenPLC on a microcontroller, so that could also be an option, but I would prefer to keep the logic within mach 3 if possible

Best reg
Roy

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Chainsaw mill project with mach 3
« Reply #5 on: December 01, 2023, 01:42:56 AM »
so if you have tested allready the read an write functions between Mach3 and your VDF's and it is working
sounds good, because this part i think is the real "Challenge".

i would make a "simple" brain for the communication.

for example :
write functions:
UserLed(1500) ON write speed1
UserLed(1501) ON write speed2
...
read functions:
read register -> limitswitch1 ON -> UserLed(1600) ON
read register -> limitswitch2 ON -> UserLed(1601) ON
read register for actual current -> write to OEMDRO
...

the complete logic i would do in VB script because it it a lot easier to test and change things
like in the brain editor. also you can directly interact with screenset button's to the UserLed's and
it will be easy to display values.

this is just my opinion how to handle this task.

Regards Thomas

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Chainsaw mill project with mach 3
« Reply #6 on: December 01, 2023, 03:12:54 PM »
Thank you Thomas
I will set up the modbus in brains for speeds and limitswitches, and try to figure out if can cut and paste some vb scripts to get the logic right
Have a great weekend Sir

Best reg
Roy

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Chainsaw mill project with mach 3
« Reply #7 on: December 02, 2023, 03:13:30 AM »
if you make your brain you can create an easy screen with
all UserLed's and Dro's and some buttons to toggle the UserLed's
for an simple test.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Chainsaw mill project with mach 3
« Reply #8 on: December 02, 2023, 06:06:44 PM »
I got the speed commands and the fwd and rev commands figured out in brains, I only need the 2 userleds for the startbuttons as single push on....stay on.....until limitsswitch activated

What do I need to put in the code to be executed on button press?

(And keep UserLED 1500 stay on, until it hits the limit switch (UserLED 1600 ON), and then reset UserLED 1500)

Set UserLED( 1500, 1) ?
......................

Sorry for my lack of VB scripting knowledge :)

BR
R

« Last Edit: December 02, 2023, 06:13:07 PM by corydoras »

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Chainsaw mill project with mach 3
« Reply #9 on: December 03, 2023, 03:49:05 AM »
Code: [Select]

'turn ON UserLed
SetUserLed(1500,1)

'turn OFF UserLed
SetUserLed(1500,0)

'toogle UserLed
If GetUserLed(1500) Then
 SetUserLed(1500,0)
Else
 SetUserLed(1500,1)
End If

an example  for waiting until Limitswitch is ON would be
Code: [Select]

'turn UserLed ON
SetUserLed(1500,1)

'Wait for Limit Switch
While GetUserLed(1600) = False
 Sleep(10)
Wend

'turn UserLed OFF
SetUserLed(1500,0)


« Last Edit: December 03, 2023, 03:54:47 AM by TPS »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.