Hello Guest it is April 25, 2024, 04:09:21 PM

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 - tiemann66

Pages: 1
1
General Mach Discussion / New Windows 7 PC build and Mach3 moves slow
« on: August 26, 2021, 07:11:45 PM »
So this is the 4th PC I have built for use with Mach3 under Windows 7 and a 6th gen intel CPU (all 4 PC's used the same hardware). This is for older selective soldering and Lead tinning machines we use to built and I support the equipment.
In this build everything communicates and appears to work well except for one major thing, everything while moving is slow. What I mean is if you tell it to travel G01 X1 F1 it should move 1 inch in 1 minute and you can time it except it takes 4 minutes to make this move so we are moving 1/4 speed. Also G04 dwell times are not correct either. If you do a G04 P3 it actually takes about 12 seconds for the dwell to finish. I am running at 25,000Hz.

This build was to replace an old PC. The old PC works just fine and is using the same profile XML from the old PC, actually its an exact copy of the Mach3 folder from the old PC. I have also confirmed all the steps, acc and vel as well.

My only thought is that there is a timing issue with the LPT port or something else is using kernel resources that may be affecting this that is different than the other 3 PC I have setup.

I can confirm that when you tell this machine to move 5" it moves 5" but at 1/4th speed then being called out with the feed speed command.

Any help or thoughts would be appreciated.

2
As a note in the code you will see I round up to the nearest 4th decimal place as that i the resolution of the CS Change Speed command. Also i have a multiplication for a gear ratio 8:5 (*0.625) and to convert RPM to revolutions per second /60.

Code: [Select]
pmpspd1 = Round ((GetUserDRO(2055)*0.625)/60,4)
I have also set a min and max speed that can be entered 400 to 1300 RPM.

Code: [Select]
pmp1spddro=GetUserDRO(2055)

If pmp1spddro < 400 Then
Call sendSerialACE("SJ" & Chr(13),"COM2")
Call SetUserLED (2055,1)
Response=MsgBox("Speed too Low...Range 400-1300",0,"Pump" )
End
End If

If pmp1spddro > 1300 Then
Call sendSerialACE("SJ" & Chr(13),"COM2")
Call SetUserLED (2055,1)
Response=MsgBox("Speed too High...Range 400-1300",0,"Pump" )
End
End If

Just some extra notes to add to my post.

3
So I wanted to update everyone on this in case it could help someone else. This is so I can control 2 stepper motor driven pumps in RPM.

So I got this working. I am using 2 FTDI USB to serial adapters, 2 Automation Direct STP-DRV-4850 stepper drives programed to SCL using 2 Automation Direct STP-MTR-23055 stepper motors.
The USB to serial adapters have been setup to COM2 and COM3.
I have used a DLL file created by an old coworker we no longer use for our equipment. See attachment link below.
I also attached an image of what the buttons and DRO's look like.

Here is the code I came up with for all the buttons and DRO use to send text strings to the drives.

Code: [Select]
'Pump 1 on / change speed VB:

While IsLoading ()
End
Wend

Private Declare Function sendSerialACE Lib "Serial_DLL2.dll" (ByVal cmd As String, ByVal port As String) As String

pmp1spddro=GetUserDRO(2055)

If pmp1spddro < 400 Then
Call sendSerialACE("SJ" & Chr(13),"COM2")
Call SetUserLED (2055,1)
Response=MsgBox("Speed too Low...Range 400-1300",0,"Pump" )
End
End If

If pmp1spddro > 1300 Then
Call sendSerialACE("SJ" & Chr(13),"COM2")
Call SetUserLED (2055,1)
Response=MsgBox("Speed too High...Range 400-1300",0,"Pump" )
End
End If

pmpspd1 = Round ((GetUserDRO(2055)*0.625)/60,4)

If GetUserLED(2055)= 1 Then
Call sendSerialACE("JA10" & Chr(13),"COM2")
Call sendSerialACE("JL200" & Chr(13),"COM2")
Call sendSerialACE("JS1" & Chr(13),"COM2")
Call sendSerialACE("CJ" & Chr(13),"COM2")
Call sendSerialACE("CS" & pmpspd1 & Chr(13),"COM2")
Call SetUserLED (2055,0)

Else
Call sendSerialACE("CS" & pmpspd1 & Chr(13),"COM2")
End If


'Pump 1 Off:

While IsLoading ()
End
Wend

Private Declare Function sendSerialACE Lib "Serial_DLL2.dll" (ByVal cmd As String, ByVal port As String) As String

Call sendSerialACE("SJ" & Chr(13),"COM2")
Call SetUserLED (2055,1)


'Pump 1 Increment Increase:

While IsLoading ()
End
Wend

Private Declare Function sendSerialACE Lib "Serial_DLL2.dll" (ByVal cmd As String, ByVal port As String) As String

pmpinc1 = (GetUserDRO(2055) +  GetUserDRO(2053))  'On Screen DRO

If pmpinc1 > 1300 Then

End
End If

Call SetUserDRO(2055,GetUserDRO(2055) + GetUserDRO(2053))

pmpspd1 = Round ((GetUserDRO(2055)*0.625)/60,4)

Call sendSerialACE("CS" & pmpspd1 & Chr(13),"COM2")


'Pump 1 Increment Decrease:

While IsLoading ()
End
Wend

Private Declare Function sendSerialACE Lib "Serial_DLL2.dll" (ByVal cmd As String, ByVal port As String) As String

pmpinc1 = (GetUserDRO(2055) -  GetUserDRO(2053))  'On Screen DRO

If pmpinc1 < 400 Then

End
End If

Call SetUserDRO(2055,GetUserDRO(2055) - GetUserDRO(2053))

pmpspd1 = Round ((GetUserDRO(2055)*0.625)/60,4)

Call sendSerialACE("CS" & pmpspd1 & Chr(13),"COM2")


'Pump 2 on / change speed VB:

While IsLoading ()
End
Wend

Private Declare Function sendSerialACE Lib "Serial_DLL2.dll" (ByVal cmd As String, ByVal port As String) As String

pmp2spddro=GetUserDRO(2054)

If pmp2spddro < 400 Then
Call sendSerialACE("SJ" & Chr(13),"COM2")
Call SetUserLED (2054,1)
Response=MsgBox("Speed too Low...Range 300-1300",0,"Pump" )
End
End If

If pmp2spddro > 1300 Then
Call sendSerialACE("SJ" & Chr(13),"COM2")
Call SetUserLED (2054,1)
Response=MsgBox("Speed too High...Range 400-1300",0,"Pump" )
End
End If

pmpspd2 = Round ((GetUserDRO(2054)*0.625)/60,4)

If GetUserLED(2054)= 1 Then
Call sendSerialACE("JA10" & Chr(13),"COM3")
Call sendSerialACE("JL200" & Chr(13),"COM3")
Call sendSerialACE("JS1" & Chr(13),"COM3")
Call sendSerialACE("CJ" & Chr(13),"COM3")
Call sendSerialACE("CS" & pmpspd2 & Chr(13),"COM3")
Call SetUserLED (2054,0)

Else
Call sendSerialACE("CS" & pmpspd2 & Chr(13),"COM3")
End If


'Pump 2 Off:

While IsLoading ()
End
Wend

Private Declare Function sendSerialACE Lib "Serial_DLL2.dll" (ByVal cmd As String, ByVal port As String) As String

Call sendSerialACE("SJ" & Chr(13),"COM3")
Call SetUserLED (2054,1)


'Pump 2 Increment Increase:

While IsLoading ()
End
Wend

Private Declare Function sendSerialACE Lib "Serial_DLL2.dll" (ByVal cmd As String, ByVal port As String) As String

pmpinc2 = (GetUserDRO(2054) +  GetUserDRO(2052))  'On Screen DRO

If pmpinc2 > 1300 Then

End
End If

Call SetUserDRO(2054,GetUserDRO(2054) + GetUserDRO(2052))

pmpspd2 = Round ((GetUserDRO(2054)*0.625)/60,4)

Call sendSerialACE("CS" & pmpspd2 & Chr(13),"COM3")


'Pump 2 Increment Decrease:

While IsLoading ()
End
Wend

Private Declare Function sendSerialACE Lib "Serial_DLL2.dll" (ByVal cmd As String, ByVal port As String) As String

pmpinc2 = (GetUserDRO(2054) -  GetUserDRO(2052))  'On Screen DRO

If pmpinc2 < 400 Then

End
End If

Call SetUserDRO(2054,GetUserDRO(2054) - GetUserDRO(2052))

pmpspd2 = Round ((GetUserDRO(2054)*0.625)/60,4)

Call sendSerialACE("CS" & pmpspd2 & Chr(13),"COM3")

I hope the above helps someone as I did a lot of research and trial and error to get this done. If any of you VB guru's see any dirty code please let me know.

4
VB and the development of wizards / using sendserial command in mach3
« on: July 12, 2018, 01:08:30 AM »
I have been trying to find a way to run send a text string to an automation direct 4850 stepper drive to use the SCL feature built in.
I can talk to the drive using terminal and can send it commands.
I just cna seem to get the VB script in mach3 to run it. I have setup the serial port in general config and using the call sendserial.

This is just a bit of what I have tried:
Code: [Select]
Sub SendSerial (chars As String)
Call SendSerial ("CJ<cr>")

The CJ stands for commence jogging and the <cr> is a carriage return.
Here is a link to the SCL manual:
https://cdn.automationdirect.com/static/manuals/surestepmanual/scl_manual.pdf

I am wondering id I should use a private declare function to call a serial dll or not or if anyone knows of one. I have spent hours online looking thi sup and can't seem to find anything. I am not awesome at VB but can make my way through it to an extent.

Any help would be greatly appreciated.

5
Hello! I am new here but not new to Mach3.
First off I have to say that I know Mach3 pretty well and configuring it except for Modbus.

Here is what I am looking to do. I am trying to control a stepper motor in RPM's to use as a pump with an analog 0-5v output card on a Direct Logic 06 PLC. I would like to use one UDRO to input a speed and then to turn it on with a button. Also an increment button would be cool too. The button can be a simple toggle on off and setting speed from UDRO using a vb command and the UDRO is the speed in RPM I want the pump to run. I am familiar with VB as in enough to be dangerous and can edit it and do basic commands in mach.

I am using the aux axis for rotation so can't use this output on the breakout board (sound logic PC to rout) plus I want to run 2 but at the moment just trying to setup one. I am running the breakout through a USS smoothstepper.

I have made a 5k pot work at this point just want to set RPM and on/off in mach3.

You may ask why a stepper for a pump, well it is what I have available to me and of course cost needs to be cheap. I will be using 2 of these setups for 2 different pumps.

Here is what I have hardware wise:
Leadshine DM805-A1 steper drive that can do 0-5v input. http://leadshine.com/UploadFile/Down/DM805-AIm_P.pdf
F0-2AD2DA-0 PLC modul for the D0-06 PLC. It does 2 anlog inputs and 2 anlog outputs but only need outputs. https://cdn.automationdirect.com/static/manuals/d0optionsm/ch12.pdf
Sure Step STP-MTR-23055 stepper motor with 166 oz-in rating.

I found the extra spindles plugin from SS Systems but can't seem to figure out how to set it up. In modbus for the analog outputs i am using the following modbus setup:
refresh is 50 ms, address 3004, registers 4 and direction is output holding. This is what i could figure from the extra spindles plugin setup instructions.

this is by far my biggest hurdle to tackle and any help anyone could provide would be awesome.

Pages: 1