Hello Guest it is October 25, 2021, 12:32:45 AM

Author Topic: help me make a numberic display on mach 3  (Read 25106 times)

0 Members and 1 Guest are viewing this topic.

help me make a numberic display on mach 3
« on: February 25, 2013, 09:23:00 PM »
 I want to make a ''number display'' by machscreen but I don't know how to make it. example : a spindle display, I have loaded a basic Turn screen, I can make a button to control spindle but no speed feedback. I can't use funtion Execute basic script to edit.
I want display the spindle speed from Boxford Duet.
Please help me do it. Thanks you very much !
Re: help me make a numberic display on mach 3
« Reply #1 on: February 26, 2013, 04:25:15 AM »
Hi,

how do you get the spindlespeed feedback in to Mach3? You need to have that value in  double format in order to display it on a DRO.
To enter the edit window for editing a basic script you have two choices:
Place a button

1)
Doubleclick the field value in the "Function" line
Select "Std Execute Basic-Script" by doubleclicking it
Doubleclick the field value in the "Execute code" line

2)
Doubleclick the field value in the "Standard Code" line
write "34" and hit the "Enter" key
Select the "Standard code" button and leave the dialog
Doubleclick the field value in the "Execute code" line

to leave the edit mode use menu:
File -> use data and close. This puts your script to the screen-set
or
File -> ignore data and close. In that case, your edited data will be ignored


Klaus
The brain isn't a soap, it doesn't shrink when used.
Re: help me make a numberic display on mach 3
« Reply #2 on: March 03, 2013, 08:30:22 PM »
Thanks for your reply!
I understand the step 1.
But in step 2, I don't know where is the Standard Code. I can't find that field.

Example VB code that I sent to CNC machine  Boxford Duet: ( spindle 500 rpm)

Sub Run_boxford() ' Boxford Duet1 9600 8 data 1 stop even parity
If (getportbyte(1021) And 32)<>0  Then   'Line Status Register bit 5 TX holding reg empty
putportbyte(1016,83) 'This is the TX register
putportbyte(1016,8) 'This is the TX register
putportbyte(1016,09) 'This is the TX register
putportbyte(1016,06) 'This is the TX register
putportbyte(1016,00) 'This is the TX register
putportbyte(1016,80) 'This is the TX register
putportbyte(1016,16) 'This is the TX register
End If
'***********************************************************************************
End Sub
 The HEX code I record from data TX and RX
Now i want to change the HEx code to Spindle display but I don't know where to make VB script for DRO in Machscreen or machdesign.
Can you show me the way clearly please!
Thanks you very much !
Hope for your reply soon!                                   
 
« Last Edit: March 03, 2013, 08:33:08 PM by nguyenlocan »
Re: help me make a numberic display on mach 3
« Reply #3 on: March 04, 2013, 02:41:46 AM »
Thanks for your reply!
I understand the step 1.
But in step 2, I don't know where is the Standard Code.I can't find that field.
Example VB code I sent to CNC machine  Boxford Duet: ( spindle 500 rpm)

Sub Run_boxford() ' Boxford Duet1 9600 8 data 1 stop even parity
If (getportbyte(1021) And 32)<>0  Then   'Line Status Register bit 5 TX holding reg empty
putportbyte(1016,83) 'This is the TX register
putportbyte(1016,8) 'This is the TX register
putportbyte(1016,09) 'This is the TX register
putportbyte(1016,06) 'This is the TX register
putportbyte(1016,00) 'This is the TX register
putportbyte(1016,80) 'This is the TX register
putportbyte(1016,16) 'This is the TX register
End If
'***********************************************************************************
End Sub


 The HEX code I record from data TX and RX
Now i want to change the HEx code to Spindle display but I don't know where to make VB script for DRO in Machscreen or machdesign.
Can you show me the way clearly!
Thanks you very much !
Hope for your reply soon!                                  
 
Re: help me make a numberic display on mach 3
« Reply #4 on: March 04, 2013, 03:43:44 AM »
you are right, the field I was talking about, can contain either "Standard Code", or "OEM_Code", depending on the last buttons function. If you insert a new button, it should show standard code though.
I don't know what your VB code is for. Obviously you are writing to a lpt port. From the address it could even be the port address Mach3 is using, is that so?


Klaus
The brain isn't a soap, it doesn't shrink when used.
Re: help me make a numberic display on mach 3
« Reply #5 on: March 04, 2013, 05:08:58 AM »
Yes, I use LPT to control 3 axis X,Y,Z . And the code I gave you that I use for controlling spindle Motor by Serial Port RS232. First , I use original software run On MS DOS  to control machine.
I get and analyze the Hex code from machine by  RS232 analyzer software, with another speed , the machine give me another Hex code.
I know the meaning of that code.
example : Hex code    53 08 09 06 00 50 10  it's mean run forward 500 rpm
Similar with another code.
Now i want to writting VB script to change the code the machine send to Mach3, and change it into Spindle Display RPM but I can't make VB script in DRO button.
If I can't  resolve it by software, You can  show me some ways to make a speedometer hardware.
Thank you very much!

Re: help me make a numberic display on mach 3
« Reply #6 on: March 04, 2013, 05:37:56 AM »
if you control your axis with your hex code, what are you using Mach3 for?
The brain isn't a soap, it doesn't shrink when used.
Re: help me make a numberic display on mach 3
« Reply #7 on: March 04, 2013, 06:24:40 AM »
yes, I use Mach3 to replace my old software. It's work on MS DOS so difficult  to control.
Now I want control with Mach3. It's more easy.
Thanks you very much.         
Re: help me make a numberic display on mach 3
« Reply #8 on: March 04, 2013, 06:33:07 AM »
I'm a bit confused, if you use Mach3, what is your script

If (getportbyte(1021) And 32)<>0  Then   'Line Status Register bit 5 TX holding reg empty
putportbyte(1016,83) 'This is the TX register
putportbyte(1016,8) 'This is the TX register
putportbyte(1016,09) 'This is the TX register
putportbyte(1016,06) 'This is the TX register
putportbyte(1016,00) 'This is the TX register
putportbyte(1016,80) 'This is the TX register
putportbyte(1016,16) 'This is the TX register
End If
for?
The brain isn't a soap, it doesn't shrink when used.
Re: help me make a numberic display on mach 3
« Reply #9 on: March 04, 2013, 07:49:23 AM »
Yes, this script for running spindle.In this forum, There are some topics talk about Mach3 and  Boxford Duet Lathe and Mill. Some experiences and information that I searched on Internet.Now I use another computer so I can't send you some information. Thanks for your answer:]