Jump to content

curiousboi

Member
  • Posts

    4
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    country-ZZ

About curiousboi

curiousboi's Achievements

0

Reputation

  1. I need to program a 3 axis epoxy machine using vb6.The moveable parts of the epoxy encapsulation dispensing machine. The robot consists of three axes – X axis, Y axis and Z axis.The X axis of the epoxy encapsulation dispensing machine robot. This axis provides both left and right motions.Y axis provides both backward and forward motions.Z axis provides both upward and downward motions.But i need to program the PCI1240 motion card which control the machine.
  2. i need to do coding on the epoxy machine to draw out a cube..but i alway stuck at step 2 could not continue to step 3, it will go back to step 1 from step2 skipping out the step3..so how to make it work for the source code so that i can draw out a square.. ErrCode = P1240MotLine(boardSel, XYZ_axis, 1, 44000, -29000, 0, 0) ErrCode = P1240MotLine(boardSel, XYZ_axis, 1, -50000, -29000, 0, 0) ErrCode = P1240MotLine(boardSel, XY_axis, 1, 0, -69000, 0, 0)
  3. Public Function moveToHome() As Boolean Dim value, ValueX, ValueY, ValueZ, ValueU As Long moveToHome = False readyStatus = False busyStatus = True If (checkSuccess(P1240MotAxisParaSet(boardNum, Z_axis, 0, 251, convertSpeed(30, Z_axis), 2000000, 260000, 500000))) Then If (checkSuccess(P1240MotCmove(boardNum, Z_axis, &H0))) Then 'Move Z in a clockwise direction value = 0 Do While ((value And &H4) <> &H4) 'Do loop if Z Limit switch still not reached checkSuccess (P1240MotRdReg(boardNum, Z_axis, RR2, value)) DoEvents Loop If (checkSuccess(P1240MotStop(boardNum, Z_axis, 4))) Then 'Do immediate stop on Z axis Do While (P1240MotAxisBusy(boardNum, Z_axis) <> SUCCESS) 'Loop while Z motor is still spinning Loop If (checkSuccess(P1240MotCmove(boardNum, Z_axis, &H4))) Then 'Move Z in anticlockwise direction value = 0 Do While ((value And &H8) <> &H8) 'Do loop if Z Home Limit switch still not reached checkSuccess (P1249MotRdReg(boardNum, Z_axis, RR5, value)) DoEvents Loop If (checkSuccess(P1240MotStop(boardNum, Z_axis, 4))) Then 'Do immediate stop on Z axis Do While (P1240MotAxisBusy(boardNum, Z_axis) <> SUCCESS) 'Loop while Z motor is still spinning Loop If (checkSuccess(P1240MotHome(boardNum, Z_axis))) Then Do While (P1240MotAxisBusy(boardNum, Z_axis) <> SUCCESS) 'Loop while Z motor is still spinning Loop If (checkSuccess(P1240MotAxisParaSet(boardNum, X_axis Or Y_axis, 0, StartVelocity, convertSpeed(30, X_axis Or Y_axis), MaXVelocity, AccelSpeed, AccelRate))) Then If (checkSuccess(P1240MotCmove(boardNum, X_axis Or Y_axis, 0))) Then 'move X and Y motors in clockwise direction ValueX = 0 ValueY = 0 Do While (((ValueX And &H4) <> &H4) Or ((ValueY And &H4) <> &H4)) checkSuccess (P1240MotRdMutiReg(boardNum, X_axis Or Y_axis, RR2, ValueX, ValueY, ValueZ, ValueU)) If ((ValueY And &H4) = &H4) Then checkSuccess (P1240MotStop(boardNum, Y_axis, 2)) End If If ((ValueX And &H4) = &H4) Then checkSuccess (P1240MotStop(boardNum, X_axis, 1)) End If DoEvents Loop Do While (P1240MotAxisBusy(boardNum, X_axis Or Y_axis) <> SUCCESS) Loop If (checkSuccess(P1240MotCmove(boardNum, X_axis Or Y_axis, 3))) Then 'Move X and Y motors in anti-clockwise direction ValueX = 0 ValueY = 0 Do While (((ValueX And &H8) <> &H8) Or ((ValueY And &H800) <> &H800)) checkSuccess (P1240MotRdMutiReg(boardNum, X_axis Or Y_axis, RR4, ValueX, ValueY, ValueZ, ValueU)) If ((ValueY And &H800) = &H800) Then checkSuccess (P1240MotStop(boardNum, Y_axis, 2)) End If If ((ValueX And &H8) = &H8) Then checkSuccess (P1240MotStop(boardNum, X_axis, 1)) End If DoEvents Loop Do While (P1240MotAxisBusy(boardNum, X_axis Or Y_axis) <> SUCCESS) Loop If (checkSuccess(P1240MotHome(boardNum, X_axis Or Y_axis))) Then Do While (P1240MotAxisBusy(boardNum, X_axis Or Y_axis) <> SUCCESS) Loop moveToHome = True End If End If End If End If End If End If End If End If End If End If readyStatus = True busyStatus = False End Function Does Anyone know what the se of the checksuccess and convertSpeed for?? This is a 3-axis epoxy,using P1240 chipboard to control it...
  4. Does anyone know how to do vb6 coding into p1240 chipboard...
×
×
  • Create New...