21
General Mach Discussion / Re: Plasma Application, Mach3 torch height control.
« on: March 28, 2010, 03:54:53 AM »
i think there may be a serial out command that is supported by mach in vb, its either serial out or in because i remember looking at it to see if i could get the plasma volatge in that way but i couldnt get 2 way communication.
In some ways i doo like the idea of referencing the voltage fromt he start of the cut too, saves a lot of messing, you just leave it to do its thing, set the feedrate to what gives you best results and it does the rest, i think it would be very interesting to be able to see what that was doing until you learned to trust it, for instance if i make 5 pierces and start cutting do i get pretty well the same voltage preset each time?? how close is it to what is in the book?? etc etc...
keep up the good work jp
Hi Matt,
I have found a way to send informations from Mach3 to the serial COM you want. Just copy paste this code into any button and run it :
Sub main()
Set MSComm1=CreateObject("MSCOMMLib.MSComm")
MSComm1.Settings = "9600,n,8,1"
MSComm1.CommPort = 5
MSComm1.InBufferCount = 0
MSComm1.PortOpen = True
If Err Then
MsgBox "COM" & MSComm1.CommPort & ": not opened, Sorry!"
Exit Sub
Else
message "port opened"
Sleep(1000)
'MsgBox "COM" & MSComm1.CommPort & ": opened !"
End If
MSComm1.Output="Torch Voltage sent by JP : " & GetOEMDRO(83) & Chr(13)
'MsgBox "COM" & MSComm1.CommPort & "output ok"
message "torch voltage sent"
Sleep(1000)
MSComm1.PortOpen = False
Set MSComm1 = Nothing
End Sub
The port that I choose is port COM5, you can change it if you don't have COM5...
I have checked that it works, the port is properly receiving the DRO value.
BTW, what are the DRO's for THC ?
I will try to update my PIC code to monitor the voltages as you propose.
Cheers
JP