Hello Guest it is March 19, 2024, 06:02:38 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TPS

561
VB and the development of wizards / Re: OEMtrig
« on: February 21, 2021, 05:27:11 AM »
i will try to make 2 files, but if all 5 OEMtrig should be set to 301, to read the script, then i would maybe tell in the script what OEM function i want ?
exactly
 
so it know that i want function 1000 on oemtrig 1 and it should turn on output 2 ?

so set OEMcode for OEMTRIG1 to 301 and the in the macroscript 304 :
Code: [Select]
If IsActive (OEMTRIG1) Then
  DoOEMButton(1000)
  activatesignal(output2)
End If


So the first file M333 tell... when a oemtrig will be activatet, look in file 334 ?
thats the was it is.[/code]

562
VB and the development of wizards / Re: OEMtrig
« on: February 21, 2021, 04:04:52 AM »
you have to create two scripts.

first lets say it is M333.M1s

Code: [Select]
SetTRiggerMacro 334            'Set Macro M334 for OEM-Code 301

M333 Needs to be added to init string

the entire macro will be M334.M1S
Code: [Select]
If IsActive (OEMTRIG1) Then
  activatesignal(output2)
End If

this will do the necessary code.

every OEMTRIG witch should call M334.M1s must be Setup with OEMCode 301 in System Hetkey Setup

563
i would try to set up a new(fresh) Profile. it normal no big deal.

564
General Mach Discussion / Re: Losing axis calibration when jogging mach3
« on: February 18, 2021, 08:51:25 AM »
your Problem is normaly caused by loosing steps and/or mechanical Problem.

do a calibraiton test of the whole range of your table, for this check a tapemeter should be ok.
repeat this a couple of times and check you get allways the same result. 

565
General Mach Discussion / Re: AKZ250 BOB Mach3 Question?
« on: February 18, 2021, 08:47:29 AM »
Your BOB is USB connected, there must be a pluging for it.
normaly there is a documentation witch tell's you what Port/Pin Setting is needed to get acces to all
avaliable in-/Outputs.

566
VB and the development of wizards / Re: Help to finish a button
« on: February 18, 2021, 08:44:46 AM »
Code: [Select]
Sleep 500

'clear x-axis Limit Switch if needed
If GetOEMLed(830) then
    Code "G91 G1 X10 F100"
    Code "G90"
    While IsMoving()
    Wend
'!!!!!!!!!!!!!!! I A PRETTY SURE HERE SHOULD BE A -> End If !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Dobutton( 22 ) ' Zerox

While IsMoving()
Wend

567
General Mach Discussion / Re: Chinese 3040 Engraver Grounding Problem
« on: February 15, 2021, 02:03:49 PM »
have a look here:
https://www.ecmweb.com/construction/article/20897728/failures-in-outlet-testing-exposed

i think good Explanation what the chinese expert did wrong.

here in Germany we had this bootleg ground System until the late 50s, then we understood that it might be dangerous.

568
Mach Screens / Re: Softlimits on RnR card---, min-max input value
« on: February 15, 2021, 01:23:44 AM »
the macro "knows" allready witch DRO it has to write too. it knows it form the
function call:

   call NumericKeyboard(800)

because 800 (in this example) is the dro number

here:

Code: [Select]
'numeric Keyboard with MIN/MAX value
Function NumericKeyboard(ByVal DRONum as Integer , ByVal Min as Double , ByVal Max as Double) As Double
Dim title as String
value = GetOemDRO(DRONum)
title = Header


Begin Dialog UserDialog1 60,60, 105, 210, "Eingabe:"  , .Enable

PushButton 10, 10, 25, 25, "7", .but7
PushButton 40, 10, 25, 25, "8", .but8
PushButton 70, 10, 25, 25, "9", .but9

PushButton 10, 40, 25, 25, "4", .but4
PushButton 40, 40, 25, 25, "5", .but5
PushButton 70, 40, 25, 25, "6", .but6

PushButton 10, 70, 25, 25, "1", .but1
PushButton 40, 70, 25, 25, "2", .but2
PushButton 70, 70, 25, 25, "3", .but3

PushButton 10, 100, 25, 25, ".", .butD
PushButton 40, 100, 25, 25, "0", .but0
PushButton 70, 100, 25, 25, "<-", .butB

PushButton 10, 130, 25, 25, "+/-", .butN
PushButton 40, 130, 25, 25, "Del", .butDel

TextBox 10, 160, 85, 18, .FText
PushButton 10, 185, 40, 21,"OK", .OK
CancelButton 55, 185, 40, 21
End Dialog


Dim Dlg1 As UserDialog1

Dlg1.FText = CStr(value)
x = Dialog( Dlg1 )

NumericKeyboard = CDbl(Dlg1.FText)
If CDbl(Dlg1.FText) < Min Then NumericKeyboard = Min
If CDbl(Dlg1.FText) > Max Then NumericKeyboard = Max

SetOEMDro(DRONum,NumericKeyboard)
End Function


is the code with MIN/MIX check included

the call would be:
Code: [Select]
  call NumericKeyboard(800,0,400)

with   call NumericKeyboard(DRO number,MIN,MAX)



this part of the code:
Code: [Select]
NumericKeyboard = CDbl(Dlg1.FText)
If CDbl(Dlg1.FText) < Min Then NumericKeyboard = Min
If CDbl(Dlg1.FText) > Max Then NumericKeyboard = Max

SetOEMDro(DRONum,NumericKeyboard)
does the check AND writes the value into the given DRO number

569
VB and the development of wizards / Re: Tool change Macro Issue
« on: February 14, 2021, 10:16:23 AM »
first i would replace:
Code: [Select]
x = GetToolChangeStart( 0 ) ' Get x tool change start position
y = GetToolChangeStart( 1 ) ' Get y tool change start position
z = GetToolChangeStart( 2 ) ' Get z tool change start position

by:
Code: [Select]
x = GetOEMDro( 800 ) ' Get x tool change start position
y = GetOEMDro( 801 ) ' Get y tool change start position
z = GetOEMDro( 802 ) ' Get z tool change start position

this:
Code: [Select]
Call SetUserDRO (1224,NewTool)
does not make sense to me, but don't know wether DRO 1224 is used somewhere else

all this verifycation for tool insert:
Code: [Select]
' Verify Tool Change Complete
Msg = "Please Insert Tool Number " & " ( " & GetSelectedTool() & " ) " & " " & GetToolDesc(NewTool) ' Define message
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons
Style = 0 + 48 + 0 ' Define buttons.
Title = "Tool Change Requested" ' Define title
Help = "DEMO.HLP" ' Define Help file
Ctxt = 1000 ' Define topic 'context. ' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)

If Response = vbOk Then ' User chose Ok
MyString = "Ok" ' Perform some action
End If

does not make many sense too, except that the machine is waiting for tool insert, because:
1.the MSG has only a OK button
2.no matter what you do (press OK or the X of msgbox), the rest of code will be done anyway

also no Chance to cancel via MSGBox input.

570
Mach Screens / Re: Softlimits on RnR card---, min-max input value
« on: February 14, 2021, 09:51:18 AM »
there is no possibilty (ok i do not know one), to set a Min/Max range for a partucular DRO.

here:
https://www.machsupport.com/forum/index.php?topic=36213.msg247828#msg247828

i posted a numeric Keyboard Input possibilty via VB, there is would be easy to inplement.