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 28, 2012, 10:44:58 AM
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
General Mach Discussion
VB calculation behind button is possible?
Pages:
1
Go Down
« previous
next »
Author
Topic: VB calculation behind button is possible? (Read 217 times)
0 Members and 2 Guests are viewing this topic.
SimKel
Active Member
Offline
Posts: 7
VB calculation behind button is possible?
«
on:
January 13, 2012, 10:47:00 AM »
Hi,
I'm new using Mach3. I'd like to know if it is possible to create button that will execute calculation and return A and B axis angle values. I'd like to be able to enter 4 measured points. I would enter the four coordinates of each point and I'd like to calculate the plan and then the angles between reference coordinates system and the plan. The goal is to orient(A,B) the part in order to mill in a single pass with the Axis. the geometry of my part is a rectangle and i new to mill the determined plan on the upside face.
Is it possible to enter points coordinates and then have Mach3 do calculation and return the value of the angle as an input for the A and B axis.
Thanks!
Logged
Hood
Active Member
Offline
Posts: 17,368
Carnoustie, Scotland
Re: VB calculation behind button is possible?
«
Reply #1 on:
January 13, 2012, 04:19:44 PM »
Not really sure what you are attempting but it is likely that could be done as most of the wizards work from code in a button.
Hood
Logged
SimKel
Active Member
Offline
Posts: 7
Re: VB calculation behind button is possible?
«
Reply #2 on:
January 16, 2012, 08:23:39 AM »
What i'm trying to do is to give 4 points (x,y,z) as an input. Those four points being processed by an algorithm and then return the value of the A axis and B axis in order to obtain the plan calculate by the algorithm. Is it possible, to take the output of the algorithm and use it as the input for the command of the A and B axis? I'd like to add four field to enter the points (x,y,z) and have a button to run the algorithm on the interface.
Logged
cjmerlin
Active Member
Offline
Posts: 180
Re: VB calculation behind button is possible?
«
Reply #3 on:
January 17, 2012, 07:56:10 AM »
It should be possible, You could create your four user Dro's using MachScreen
http://www.kd-dietz.de/index_eng
Add a calc button with your code in.
Have a browse in the documentation for the Mach3 programmers reference PDF which will give you all the info you'll need.
Also a reference to the VB script
www.indusoft.com/pdf/VBScript%20Reference.pdf
Logged
SimKel
Active Member
Offline
Posts: 7
Re: VB calculation behind button is possible?
«
Reply #4 on:
January 17, 2012, 08:51:37 AM »
Thanks for helping me out! I'll need a couple hours to go trough all this literature
Logged
Tweakie.CNC
Active Member
Online
Posts: 3,263
Super Kitty.
Re: VB calculation behind button is possible?
«
Reply #5 on:
January 17, 2012, 10:53:48 AM »
It is my understanding that Mach supports a subset of VB which is Cypress Enable. Not all of the current VB commands are available to be used in Macro's / Button Scripts etc. so it would be best to use the CB reference guide for all your VB expressions
http://www.machsupport.com/MachCustomizeWiki/pdfs/VB-Script-Commands.pdf
.
Tweakie.
Logged
Success consists of going from failure to failure without loss of enthusiasm. Winston Churchill.
SimKel
Active Member
Offline
Posts: 7
Re: VB calculation behind button is possible?
«
Reply #6 on:
January 18, 2012, 09:03:53 AM »
I have a little problem that might be simple for someone. I've generated with VBscript a text file containing some GCode as it follows:
G00 A0. B0.
A0.7562497658762
B21.764485993774
M99
When I load this text file, there is nothing in the Gcode MDI. Here is how I generate the text file:
Dim fs,f As Object
Set fs =CreateObject("Scripting.FileSystemObject")
Set f=fs.CreateTextFile("c:\mach3\GCode\result_orient_shim.txt",2,true)
f.writeline("G00 A0.B0.")
f.writeline("A"&teta)
f.writeline("B"&zeta)
f.writeline("M99")
f.close
Set f=Nothing
Set fs=Nothing
Is there something wrong with my textfile!?!?
Logged
SimKel
Active Member
Offline
Posts: 7
Re: VB calculation behind button is possible?
«
Reply #7 on:
January 18, 2012, 09:51:34 AM »
I found out what was happening! The problem was in this code line
Set f=fs.CreateTextFile("c:\mach3\GCode\result_orient_shim.txt",2,true)
I should have used the parameter false instead of true. The MDI read text file in ASCII which corresponds to the value false. True corresponds to Unicode which is not compatible with the interface.
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...