Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 08:56:01 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  User Label
Pages: 1   Go Down
Print
Author Topic: User Label  (Read 414 times)
0 Members and 1 Guest are viewing this topic.
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« on: October 27, 2011, 08:19:44 AM »

Guys...Is there any way to make a user label persistent?  If I set it's value then close and reopen Mach, the user label is blank.   Thanks
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 2,619



View Profile WWW
« Reply #1 on: October 27, 2011, 10:50:20 AM »

Create a macro to fill it in and put the macro in your initialization string?? Not ideal, and maybe won't even work correctly.
Logged

rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« Reply #2 on: October 27, 2011, 11:19:52 AM »

Create a macro to fill it in and put the macro in your initialization string?? Not ideal, and maybe won't even work correctly.

That probably won't work.  No way to know what to fill it with as the user can change the label any time.  I could write it to a text file, then open the text file to populate the label. 

How do I use the initialization string?  Is that something that fires when Mach opens?
Logged
Graham Waterworth
Administrator
*
Online Online

Posts: 1,665


West Yorkshire, England



View Profile WWW
« Reply #3 on: October 28, 2011, 02:37:44 AM »

You could hard code it into the Macropump
Logged

G-Code is on the cutting edge

Autovalues Engineering, CNC machining specialists, Bradford, England
BR549
Active Member

Offline Offline

Posts: 2,557


View Profile
« Reply #4 on: October 28, 2011, 11:07:47 AM »

The init string runs anytime Mach3 resets such as startup and reset.

You create a Mcode (example M1099) then put in what CB code is required AND include that Mcode in the init string.

Mach will then apply what was in the code to mach if/when it resets.

I take it the lable info is NOT numeric and you cannot use a dro?

(;-) TP

Logged
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« Reply #5 on: October 30, 2011, 08:12:58 PM »

The init string runs anytime Mach3 resets such as startup and reset.

You create a Mcode (example M1099) then put in what CB code is required AND include that Mcode in the init string.

Mach will then apply what was in the code to mach if/when it resets.

I take it the lable info is NOT numeric and you cannot use a dro?

(;-) TP



Yes...It is non numeric...unfortunately.
Logged
zealous
Active Member

Offline Offline

Posts: 486



View Profile WWW
« Reply #6 on: November 02, 2011, 06:55:51 PM »

Scott posted this awhile ago but the search function in Mach's forum is broken
Just change the location of "UserLabel.AGD" to store the Userlabels when you close Mach3, maybe make a Save button.
I dont rember if Mach3 has a Mcode that gets fired off when you shut it down, but if there is one you can put this script in there to store the userlabels.

Code:
UserLabels = 1
Open "C:\\Program Files\\AGD\\UserLabel.AGD" For Output As #6
For z = 1 To 250
LabelState = GetUserLabel(UserLabels)
Print  #6, LabelState
UserLabels = (UserLabels + 1)
Next z
Close #6
Code("SAVE_XML")


Put this in a Macro to load the stored labels:

Code:
Dim fich3 As String
fich3="C:\Program Files\AGD\UserLabel.AGD"
If Dir(fich3)<>""  Then
Call Dir("null")
UserLabels = 1
Open "C:\Program Files\AGD\UserLabel.AGD"  For Input As #5
Do While Not EOF(5)
Line Input #5, FileData
SetUserLabel(UserLabels, FileData)
UserLabels = UserLabels + 1
Loop
Close #5
Else
Call Dir("null")
MsgBox("no file to load:" & fich3)
End If

otherwise you'll have to request that Mach3 stores user/Labels in the XML.
Logged

Regards, Jason Blake

www.Fusioncnc.com
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!