ActiveX: Get controller details

ActiveX: Get controller details

This sample of code is from a Visual Basic Program.  It reads system variables from the Motion Coordinator after the TrioPC Motion ActiveX/DLL connection is opened.

        Dim d_value As Double
        Dim l_value As Long

        Terminal.AppendText("TrioPC Vers: " & AxTrioPC1.ProductVersion() & vbCrLf)
        l_value = AxTrioPC1.GetConnectionType()
            Terminal.AppendText("Connection type " & CStr(l_value) & vbCrLf)
        AxTrioPC1.GetVariable("CONTROL", d_value)
            Terminal.AppendText("Controller " & CStr(d_value) & vbCrLf)
        AxTrioPC1.GetVariable("SERIAL_NUMBER", d_value)
            Terminal.AppendText("Serial Number " & CStr(d_value) & vbCrLf)
        AxTrioPC1.GetVariable("VERSION", d_value)
            Terminal.AppendText("System SW V" & CStr(d_value) & vbCrLf)

Example output to terminal in VB application:

TrioPC Vers: 4,0,2,338
Connection type 2
Controller 600
Serial Number 4085
System SW V2.0308006002

    • Related Articles

    • AN-304 Adding TrioPC to Visual Basic

      A connection between a Windows PC and a Motion Coordinator can be made with an ActiveX component called TrioPC Motion. The ActiveX component must be added to the Visual Basic project. This document describes this step by step. The example is based on ...
    • AN-399 TrioPC Motion Performance with Flex-6 Nano

      This document describes some timing tests with made with TrioPC motion Active X and Flex-6 Nano Motion Coordinator.
    • Reading blocks of data from TrioPC Motion ActiveX or DLL

      The ActiveX and DLL have a way to read blocks of data. The method is called PRMBLK. If you look at he help, it shows you the list. You need to define the type of block you want to read, for example DefineSystem would be used to read system values ...
    • Trio Project Keys

      I used to be able to generate project keys for Trio’s that are out in the field by using the Motion Perfect 2 project encryptor. I’d put the last 5 digits of the serial number in and that would give me the project key so I could make SD cards with ...
    • Motion Perfect problem when SCOPE command is used

      When running the SCOPE command in a program, I think Motion Perfect doesn't like the SCOPE command being issued over and over when I run it. It seems more stable when I comment the SCOPE command out after it's ran once. ...