Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB2013 GUI Form build

VB2013 GUI Form build

Scheduled Pinned Locked Moved Visual Basic
1 Posts 1 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vis Kataboman
    wrote on last edited by
    #1

    Can someone help please? I have been building a GUI to connect up to Arduino Mega Mini Pro board to run CNC GRBL. where, I am only utilising the GRBL to run B & C rotational axis (yes, the GRBL is 5 axis library). So, the GRBL compiles and loads up onto the Mega Mini Pro, just fine. The GUI is all good (I think) with its own little connection form that allows me to choose port and baud rate and connect. I load up the relevant G-Code and before I can press the run button, the GRBL seems to be receiving the instruction as soon as I load it up on the text display. also the highlight, meant to move one line at the time, but that isn't whats happening! Also, the Realtime display for the B & C aren't displaying anything at all! all though I can see on the output window of the VB2013, that GUI is talking to GRBL and GRBL is talking back as well as the display data is updated and sent back by GRBL, yet not displayed on the GUI! Also the buttons for +B,-B,+C,-C aren't working well either. meaning, there are intermittent responds from them, even though I've added delays for time to respond! not sure what I can do to make this GUI work. Can you help please? I am attaching the code here for both main form and the connection sub form, how do I post the image of the GUI? for the moment, I am not attempting anything with MPG. Main GUI:

    Imports System.IO.Ports
    Imports System.IO
    Imports System.Windows.Forms

    Public Class CNC4thand5thAxisControlGUI
    Private WithEvents serialPort As New SerialPort()
    Private gCodeLines As List(Of String)
    Private currentLineIndex As Integer = 0
    Private isPaused As Boolean = False
    Private bPosition As Double = 0.0
    Private cPosition As Double = 0.0
    Private incomingDataBuffer As String = String.Empty
    Private isExecutionComplete As Boolean = False
    Private isGRBLReady As Boolean = True ' Indicates if GRBL is ready for next command
    Private WithEvents tmrPosition As New Timer() ' Timer for position updates

    ' Initialize and start the timer for real-time position updates
    Private Sub tmrPosition\_Tick(sender As Object, e As EventArgs) Handles tmrPosition.Tick
        If serialPort.IsOpen Then
            serialPort.WriteLine("?") ' Send status request to GRBL
        End If
    End Sub
    
    ' Form Load event
    Private Sub CNC4thand5thAxisControlGUI\_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        gCodeLines = New List(Of String)
        serialPort.BaudRate = 115200
        ser
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups