Not using VB but am using C# to prototype a communications program to the Axon. Simply use a Serial Object and set all the params for the serial connection. Here is a listing for C#, it's very basic and should be able to be ported to VB with very little issues:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;
using System.Diagnostics;
using System.Threading;
namespace SerialControl
{
class Program
{
static SerialPort sp;
static byte[] reply = new byte[16];
static void Main(string[] args)
{
// initialize the serial port
initSP();
bool cont = true;
try
{
sp.Open();
Trace.WriteLine("Opening the COM port");
}
catch (Exception e)
{
Trace.WriteLine(e.InnerException);
}
// Just keep sending the same message over and over again
// infinite loop
while (cont)
{
if (sp.IsOpen)
{
sp.Write("Hello Axon!");
Thread.Sleep(100);
sp.Read(reply, 0, 16);
string s = System.Text.ASCIIEncoding.ASCII.GetString(reply);
Trace.WriteLine(s);
}
else
{
cont = false;
}
}
sp.Close();
}
static bool initSP()
{
bool Success = false;
try
{
sp = new SerialPort();
sp.PortName = "COM3";
sp.BaudRate = 115200;
sp.DataBits = 8;
sp.Parity = Parity.None;
sp.StopBits = StopBits.One;
Success = true;
}
catch (Exception e)
{
Trace.WriteLine(e.InnerException);
}
return Success;
}// initSP
}
}
Keep in mind I did this in about 2 minutes so there may be bugs, however it works.