Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 25, 2012, 02:11:02 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
VB and the development of wizards
VB commands needed for tooltable
Pages:
1
Go Down
« previous
next »
Author
Topic: VB commands needed for tooltable (Read 870 times)
0 Members and 1 Guest are viewing this topic.
softselect
Active Member
Offline
Posts: 56
VB commands needed for tooltable
«
on:
December 29, 2009, 05:00:42 PM »
I have just completed my all in one lathe screen, now i want to add a wear offset calculation routine, that will read the current tool wear value and a userDRO contaning the wearoffset measured, then do some math and store the recalculated wear value back in the tool table
the code i will use to get the measured wear is something like this, but i cant fint the correct commands/veriable names
TWx=GetUserDRO(1201) (read value from user DRO 201)
TW=GetWear....? (get wear value of X or Z from tooltable)
calculate new value for X axis e.g. (TWx/2)*-1 + TW
setWear.... = newvalue (store new value to tooltable)
Hope someone can help
Friedrich
Logged
Chaoticone
South Carolina, US
Administrator
Offline
Posts: 3,598
Precision Chaos
Re: VB commands needed for tooltable
«
Reply #1 on:
December 29, 2009, 05:43:01 PM »
Friedrich, see if the attached helps. It is only for a refrence for you. Still lots of checking, verifying, editing to do. Maybe an idea of some things to come. Use the numbers in the old numbers column.
Brett
OEM List Alpha 3.ods
(60.3 KB - downloaded 77 times.)
OEM List Alpha 3.xls
(245.5 KB - downloaded 54 times.)
Logged
If you could see the things I have in my head, you would be laughing too.
www.precisionchaos1.com
My guard dog is not what you need to worry about!
softselect
Active Member
Offline
Posts: 56
Re: VB commands needed for tooltable
«
Reply #2 on:
December 30, 2009, 07:45:53 AM »
Thanks Brett,
But i dont see a code for the tool wearx and wearz
I will post the Q on yahoo, maye Brain or Art can help
Friedrich
Logged
Graham Waterworth
Administrator
Offline
Posts: 1,665
West Yorkshire, England
Re: VB commands needed for tooltable
«
Reply #3 on:
December 30, 2009, 11:59:55 AM »
GetToolParam(SHORT toolnum, SHORT param) for tool parameters.
Param numbers are 1 - n and correspond to the tool window in the mill or turn modes. In turn for example, 1 is TipDia, 2 is Tip Radius. Etc.
And to put it back use :-
SetToolParam(SHORT toolnum, SHORT param, DOUBLE data)
Then you must re-store the tool table by doing a DoButton(316) "save tool table"
This is all from memory as I am not at my normal computer, errors may be included free of charge
Graham
«
Last Edit: December 30, 2009, 12:12:33 PM by Graham Waterworth
»
Logged
G-Code is on the cutting edge
Autovalues Engineering, CNC machining specialists, Bradford, England
softselect
Active Member
Offline
Posts: 56
Re: VB commands needed for tooltable
«
Reply #4 on:
December 30, 2009, 02:29:20 PM »
hi Graham
thanks for the info, i tried the following code
CT=GETDRO(24)
DTX=GETTOOLCT (SHORTCT, SHORT5)
TWx=GetUserDRO(1201)
NV=((TWX/2)*-1)+DTX
SetToolCT(SHORTCT, SHORT 5, DOUBLE NV)
DoButton(316)
and i get an error "Scriptter compile error"
Break down of what i am trying to do
CT=GETDRO(24) /get current tool number
DTX=GETTOOLCT (SHORTCT, SHORT5) /get wear value from table, if i add line y line for testing it give error here already
TWx=GetUserDRO(1201) /get user wear value
NV=((TWX/2)*-1)+DTX /calculate new waer value
SetToolCT(SHORTCT, SHORT 5, DOUBLE NV) /store new wear value
DoButton(316) /save tool table
i am probebly doing it all wrong, but then the last real programming i done was BBC basic back in the 80's
thanks Friedrich
Logged
Graham Waterworth
Administrator
Offline
Posts: 1,665
West Yorkshire, England
Re: VB commands needed for tooltable
«
Reply #5 on:
December 30, 2009, 03:21:06 PM »
Try it more like this :-
CT=GETDRO(24)
DTX=GETTOOLparam(CT ,5)
TWx=GetUserDRO(1201)
NV=((TWX/2)*-1)+DTX
SetToolparam(CT, 5, NV)
DoButton(316)
Graham
Logged
G-Code is on the cutting edge
Autovalues Engineering, CNC machining specialists, Bradford, England
softselect
Active Member
Offline
Posts: 56
Re: VB commands needed for tooltable
«
Reply #6 on:
December 31, 2009, 05:35:04 AM »
hi Graham
Thanks for the prompt responce, i tried it like you said, now i dont get the error, but nothing happens, any ideas
i saw some code on the forum some where that said to use CALL in front of the GetDRO...., tried that but it seems to have no effect
the tool table doesnt even come up, i even changed it to doButton(121)
maybe i should just wait till you get to ur usual computer, i assume its at your shop
Thanks for your time
Friedrich
Logged
softselect
Active Member
Offline
Posts: 56
Re: VB commands needed for tooltable
«
Reply #7 on:
January 02, 2010, 05:25:36 PM »
hi graham,
the solution is as follows, thanks for your guidance, once i put in the dim statements it worked
DIM CT
DIM DTX
DIM TWX
DIM NV
'X WEAR=5
'ZWEAR=6
CT=GETDRO(24) 'GET CURRENT TOOL
DTX=GetToolParam(CT,5) 'GET CURRENT WEAR OFFSET
TWx=GetUserDRO(1201) 'GET REQUESTED OFFSET
NV=((TWX/2)*-1)+DTX 'CALCULATE ACCUMULATED OFFSET
CALL SetToolparam(CT, 5, NV) 'SEND VALUE TO TOOL TABLE
MESSAGE "OFFSET ACCUMULATED" 'STATUS INDICATOR
DoOEMBUTTON(121) 'SAVE TOOLTABLE
Happy new year from a swelteringly hot South Africa
Thanks Friedrich
Logged
Pages:
1
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...