github.com/GrTravis2/iv3

Keyence IV3 Camera TCP/IP Commands


License
MIT
Install
go get github.com/GrTravis2/iv3

Documentation

Package of commands that operate Keyence IV3 cameras using TCP/IP procedures written in GO!

Initialize a camera:

myCamera := Camera {
    Location    string,
    Description string,
    IpAddress   string,
    Port        string, //iv3 defaults to port "8500"
    Delimiter   string, //iv3 defaults to carriage return "\r\n"
    }

Use the camera object and additional arguments to "do stuff"

Changing programs

var programNumber int
var myCamera Camera
var response string

response = ProgramChange(programNumber, myCamera)
//reads response and returns success/unsuccessful

Read current program

var myCamera Camera
var response string

response = ReadProgramNumber(myCamera)

Command camera to trigger and return program results, this one is more complicated...

two more structs are used in the response for this command:

type CameraResult struct {
    resultNumber    int
    totalPassResult bool
    toolResult      []ToolResult
}

type ToolResult struct {
    toolNumber     int
    toolPassResult bool
    matchingRate   int
}

Results are returned in the form of a camera result struct made of summary values and individual tool results

var myCamera Camera
var cameraResult CameraResult

cameraResult = TriggerStatusResult(myCamera)

Command to read current operating status of the camera

var operating bool

operating = OperatingStatus(myCamera)
//if camera in "run" mode operating == true
//else operating == false or ("program" mode / not operating)

List of commands are still a WIP...