PDA

View Full Version : VisualBasic and Mach(N)



campaX
12-21-2005, 07:40 AM
I'd like to use a LCD that I got from www.crystalfontz.com (http://www.crystalfontz.com/) like DROs.
I will connect the LCD to the serial port and write a Visual Basic program that sends the information to the serial port.
How can I interface with Mach2 or Mach3 with Visual Basic?
I'm talking about real Visual Basic programming, no VB Scripts...
I tried to use the OCX component, but an error comes up when i run it.

please help me.

ger21
12-21-2005, 09:14 AM
Supposedly you can, but I don't think anyone's been able to do it. Mach3 can send serial commands which might work for what you're doing. You might want to ask ChrisD, I know he's using the serial functions.

Chris D
12-21-2005, 09:45 AM
I'd like to use a LCD that I got from www.crystalfontz.com (http://www.crystalfontz.com/) like DROs.
I will connect the LCD to the serial port and write a Visual Basic program that sends the information to the serial port.
How can I interface with Mach2 or Mach3 with Visual Basic?
I'm talking about real Visual Basic programming, no VB Scripts...
I tried to use the OCX component, but an error comes up when i run it.

please help me.


You will have to use the SendFIFO command from within the VB Scripting language (Macros in Mach). Art has a complete manual for the scripting language on his website and using the macropump feature of Mach, you can have the script running all the time (once, every 100 msec). So, the update speed will be a bit slow, but also keep in mind you have to send the data out via the serial port. Depending on how much data you send, that may end up beeing the limitting facter as to how fast things update.

I am 99.7342% certain you cannot use Visual Basic with Mach.

Hope that helps a bit

Chris