Home

Table of Contents

image

Contents

1. www imi3D com Delta BC V3M 6V5 Canada Title Interfacing Gocator 4 x firmware to LabVIEW Revision 1 1 Table of Contents PONO EeE 2 le GE ne EAG El GN 3 mice GONE AVON GIN 3 3 Setting up the Gocator to Communicate with LabVIEW nennen nnne nennen nnne nnns 3 zd Cro Miei E KaD RETO A 4 4 1 Structure of the Go2Labview Example eese SEENEN oes stes tessera nn poa dern sa oca pana iiiaae indita 7 Eeler EE 9 eh G 01612 6 PUDIIC MP PCIE 10 EO VY NT E 11 Fa Oy iila RET m uu M 11 8 Wrapping Go SDK Functions ccccccccccceccseeeeeeeeeeeeeeaeeeeeeeeeeeesaaaeeeseeeeeeeeseeeeeueceeeeessseeeeeeeeeeesessaeseseeeeesessaaaeeeeeeees 11 OS 0 1 E 14 Page CONFIDENTIAL Canada 227 d f 604 636 1011 SS info imi3D com 1675 Cliveden Avenue wf LMI TECHNOLOGIES m 1 604 516 8368 www ilmi3D com Delta BC V3M 6V5 1 Overview LabVIEW is a comprehensive software package for controlling measurement and control systems LMI provides a set of Virtual Instruments Vls that can be used to interface LabVIEW with Gocator 2x00 sensors These VIs can be used to control and stream measurement results intensity and 3D data as individual profiles or whole part
2. op i to send Video 3D Intensity are user selectable 3D data can p NJ Analog be in the form of ranges profiles or surfaces depending on Surface Intensities Trigger event and current scaling inp d R 7 e the Gocator series ma Top Serial M ORO C URN BE NS Or ere Ne RE Tim mete d easurements Protocol and data selection All of the tasks that can be accomplished in the Gocator s web interface can be accomplished programmatically by WA Surface Bounding Box X 0 sending and receiving Gocator protocol control commands m Surface Bounding Box Y wi Surface Bounding Box Z 2 1 Surface Plane X Angle 3 Ma Surface Plane Y Angle 4 v Surface Plane Z Offset 5 Figure 1 Enabling Output over Ethernet in the Output Page Surface scan mode shown 4 Go2Labview Example Go2Labview is an example of how the Gocator Public Vis can be used It is also a tool that can be used to verify the Gocator and the environment is setup correctly To run the Go2Labview example expand the Examples node in the project file and then double click on Go2Labview Main vi With the LabVIEW example running the panel controls the Gocator and displays data generated by the Gocator in real time Go2 DLL Version IP Address E disconnect e Start Profile Height Map Part Intensity Measurements ETE IH aa mL e 4 255 12 t 180 180 A 5 H 4 160 160 2 0 140 140 2 1 1 1 1 1 1 0 200 400 600 800 1000 1200 12
3. The Gocator changes from the Running to the Ready state Disconect vi Disconnect the TCP connections to the Gocator This can only be called when the sensor is not running Receive x This VI accepts a queue as the input On every invocation it polls the Gocator for the latest result If a new result is available it queues the result If no results are available it waits until the next one comes Internally it is an infinite loop Wrap a while loop around this VI to receive multiple results 6 64 Bit LabVIEW The Gocator Public Vis do not support the 64 bit version of LabVIEW Users can still run 32 bit versions of LabVIEW with the Public Vis on 64 bit machines 7 Dual Sensor System The Gocator Public Vis currently only supports standalone sensor applications Contact LMI on how to extend the Public Vis to support dual sensor system 8 Wrapping Go SDK Functions Under the hood of the Gocator Public Vls is the logic that calls the functions in the GoSdk dll The wrappers for calling GoSdk dll functions are located in the Private folder By studying and understanding these example wrappers users can then extend or modify the program to create their own custom Gocator LabVIEW application The Gocator SDK has many more functions beyond what is covered by the example such as sensor configuration and alignment calibration The following illustrates the logic inside the Connect public VI error in no error IS error out Figure 1
4. to interface LabVIEW with Gocator 4 x firmware These Vis can be used to control and stream measurement results intensity and 3D data as individual profiles or whole part scans into LabVIEW in real time for processing and control Users can further extend the capability of the Gocator Public VIs by wrapping additional Gocator SDK functions using the method described in the last section Page 14 CONFIDENTIAL
5. 0 Internals of Connect VI The Connect vi calls a number of the GoSdk dll functions including GoSystem Consitruct and GoSystem Connect Clicking on the Go icon will open up the front panel of the wrapper Then select Page 11 CONFIDENTIAL www Imi3D com Canada 227 d f 604 636 1011 SS info imisD com 1675 Cliveden Avenue wf LMI TECHNOLOGIES tm 1604 516 8368 Delta BC V3M 6V5 Window gt Show Block Diagram to reveal the internals of the wrapper Below is the block for calling the GoSystem_Construct function GoFx kStatus GoSystem_Construct GoSystem system kAlloc allocator GoSystem_ Construct GO GH error in no error i Leem error out system in Lerch HANDLE DI uz mi m return cade system out Figure 11 GoSystem Construct wrapper The Call Library Function Node wraps the function call to the GoSdk dll The Go2Labview ErrorHandler is a common block that accepts a kStatus error code and logs an error message if the result is not okay path out arror in mio error error out return value param 1 param 1 output paranig Z E path in param 2 aukput Figure 12 Call Library Function Node To set it up a Call Library Function Node for a new GoSdk adll function 1 Open create the Call Library Function node 2 Inthe Library name or path field set the path of the GoSdk dll to Private GoSdk dll The path is relative to the location of the VI file 3 Choose the function from the Function nam
6. 0 120 X pixels F F Profile Intensity 3 1 al 253 200 B 4 150 g 5 100 N 50 07 1 1 I D 1 0 200 400 600 800 1000 1200 X pixel 07 1 1 1 1 1 1 1 1 1 1 07 1 1 1 1 1 1 1 1 0 100 200 300 400 500 600 700 800 900 1000 1100 0 100 200 300 400 500 600 700 800 900 1000 1100 X pixel j 1 X pixel Frame Count Timestamp Encoder EncoderIndex X Offset X Resolution Y Offset Y Resolution Z Offset Z Resolution Source o Ir ilo Ire It do 0 Ir o Ir fo Ir Ir je o Jf ifo Figure 2 Gocator LabVIEW Main Panel To confirm the GoSdk dll is installed properly 1 Run the Go2Labview Main 2 Check the reported GoSdk dll version is correct Page 4 CONFIDENTIAL www imi3D com Delta BC V3M 6V5 Canada Go2 DLL Version 4 09156 To connect to the Gocator and acquire data 1 Press Connect n Connect Note IP address is no longer needed as the GoSystem Connect call will connect to all available sensors on the network k 2 Press Start The laser line of the sensor should turn on if the Gocator is in time triggered mode and data should start appearing in the displays If the Gocator is configured to be encoder triggered move the encoder in order to trigger data capture Profile D4 A d l l l l l l l l l l 0 200 400 600 800 1000 1200 1400 1600 1800 2000 A pixels Profile Intensity 255 s s Z intensity s l l l l l l l l 0 200 400 600 800 1000 1200 1400 1600 180
7. 0 2000 X pixel Figure 3 Go2Labview Running in Profile Mode Page 5 CONFIDENTIAL Canada Ser t 604 636 101 E info imisD com 1673 Cliveden Avenue wf LMI TECHNOLOGIES m 1 604 516 8368 Q www lmi3D com Delta BC V3M 6V5 Height Map Part Intensity p 4 4236 IF 255 120 3277 110 2412 100 Y pixel n Y pixel I I l I I I l I l I I I l I I l I I I I 0 50 100 150 200 250 300 350 400 450 500 550 600 650 700 0 50 100 150 200 250 300 350 400 450 500 550 600 650 700 X pixel X pixel Encoder Encoder Index X Offset X Resolution Y Offset Y Resolution Z Offset Z Resolution Source 1007 o 34 364 Tome 34 Jost o 0 003 0 A Figure 4 Go2Labview Running in Whole Part Mode Measurements Figure 5 Go2LabView displaying Measurement Results Page 6 CONFIDENTIAE Canada c2 amp 160 O f lived 4 636 1011 E info imi3D com 1673 Cliveden Avenue wf LMI TECHNOLOGIES amp 1604 516 8368 www imi3D com Delta BC V3M 6V5 Refer to section 4 2 for explanations of the various fields 3 Press the Stop button to stop the sensor 4 Press the Disconnect button to disconnect and close the session If Run Continuously is selected the panel will go back to its initial state waiting for the Connect button to be pressed Note The Disconnect must be clicked to disconnect the ports before stopping the program 4 1 Structure of the Go2Lab
8. Tools Labview Go2Labview Ivlib The 32 bit version of the GoSdk dll is included in the Labview Private area 2 1 GoSdk dll and kApi dll The Vis in the private folders are building blocks of the Gocator LabVIEW interface These VIs call functions exposed in the Gocator SDK DLL GoSdk dll By default the GoSdk dll is located in the Labview Private folder Each tools package contains the GoSdk dll that matches with the tool package version Put the matching GoSdk dll and kApi dll in the Private folder to use the same LabVIEW project for a different Gocator firmware version 3 Setting up the Gocator to Communicate with LabVIEW To communicate with LabVIEW the Gocator needs to send Profile or Whole Part output over Ethernet using the Gocator Protocol The Gocator LabVIEW VIs can receive profile profile intensity part part intensity and measurement data Page 3 CONFIDENTIAL Canada A 604 636 1011 E info imisD com 1673 Cliveden Avenue wf LMI TECHNOLOGIES tm 1604 516 8568 d www Imi3D com Delta BC V3M 6V5 Output Ethernet Protocol Gocator Protocol and data selection uil Digital 1 Information Data Trigger event and pulse width anm E rigger event and pulse widti The Gocator protocol uses TCP messages to control the Send Name ID Digital 2 sensor and to transmit data and measurement results to a Surfaces ii Trigger event and pulse width client computer Measurements and what type of scan data e Tc aa H ES
9. e field Page 12 CONFIDENTIAL 222 L 1604 636 1011 info Imi3D com 1673 Cliveden Avenue Wl LMI TECHNOLOGIES WE amp 1604 516 8368 www Imi3D com Delta BC V3M 6V5 Canada IS Call Library Function ms Im ry Function Callbacks Error Checking Library name or path CA Users Default ADMO06 Desktop 4 0 Labview Private GoSdk dll Run in Ul thread Thread Run in any thread E Specify path on diagram Function name GoSystem Construct Calling convention stdcall WINAPT P C Function prototype int32 t GoSystem ConstructiS uint32 t system uint32 t allocator Consider using a wizard instead Figure 13 Function field in Call Library Function Node 4 Switch to the Parameters tab and setup the parameters accordingly Page 13 CONFIDENTIAL Canada Ger amp 1604 636 1011 fo Imi3 1673 Cliveden A 101 SS info imisD com iveden Avenue wf LMI TECHNOLOGIES gy 1604 516 8368 Q www ImisD com Delta BC V3M 6V5 4 Call Library Function ke Function Parameters Callbacks Error Checking Current parameter return type system allocator Name return type Type Numeric Constant Data type Signed 32 bit Integer Function prototype int32_t_GoSystem_Construct 8 uint32_t system uint32_t allocator Consider using a wizard instead Figure 14 Parameters Field of Call Library Function 9 Conclusion Gocator Public VIs is a set of Virtual Instruments VIs that can be used
10. lution ranges indexY indexX X in system coordinate xOffset xResolution indexX X in system coordinate yOffset yResolution indexY Part Intensity 2D array of U8 Array of profile intensity values Items in the array are arranged in the same order as items in the profile array A value of 0 indicates no intensity data Measurements 1D array of Each Measurement Data carries the result of one Measurement Data measurement tool A Measurement Data has the following cluster fields Source Measurement ID Decision Measurement decision O if the measurement falls outside of the decision limits or is invalid 1 if the measurement falls within the decision limits Value Value of the measurement Hefer to Measurement under Data Result section in the Gocator User Manual for the possible values of Type Source and Value 5 Gocator Public Vis Page 10 CONFIDENTIAL Canada SP d f 604 636 1011 SS info imisD com 1675 Cliveden Avenue wf LMI TECHNOLOGIES Herod MM m Initialize vi Initializes the Go2 SDK environment Users must call this function ui before using any of the other Gocator public VIs Connect vi Constructs the global system handle and establishes the control data and health TCP connections to the Gocator This must be called before starting the Gocator Start vi Start the Gocator The Gocator changes from the Ready to the Running state otop vi Stop the Gocator from running
11. rement results between the user block diagrams and Gocator Public VIs hh RR ER RE BR feo eet RR al de Figure 9 Gocator Result Cluster The structure mirrors the Gocator Data Result defined in the Ethernet Protocol section in the Gocator User Manual SO Source U32 Profile Source of the data SS SX 0 Main sensor SE Sv SH 1 Buddy senso www Imi3D com Canada Set amp f liveden A 604 636 1011 SS info imisD com 1675 Cliveden Avenue wf LMI TECHNOLOGIES amp 1604 516 8568 Delta BC V5M 6V5 Timestamp Encoder Encoder Index Frame Count Exposure Exposure value us This value is only available when profile is received X Y Z Offset and Double Scale and translation factors for converting pixel coordinates Resolution into real world coordinates See below for how these values are used Profile 1D array of 116 Array of z resampled profile data Each element is a range value 0x8000 represents NULL Z in system coordinate zOffset zResolution ranges index X in system coordinate xOffset xResolution index Profile Intensity 1D array of U8 Array of profile intensity values Items in the array are arranged in the same order as items in the profile array A value of 0 indicates no intensity data Part 2D array of 116 2D Array of z resampled profile data Each element is a range value 0x8000 represents NULL O ER Z in system coordinate zOffset zReso
12. scans into LabVIEW in real time for processing and control This document assumes that LabVIEW is already installed Users are assumed to be already familiar with LabVIEW and the Gocator must already be setup to generate profile or whole part data Gocator Firmware Release 4 0 0 or later and LabVIEW Version 2010 82 bit or later are required Page 2 CONFIDENTIAL www ImiS5D com 227 d f 604 636 1011 SS info imisD com 1675 Cliveden Avenue wf LMI TECHNOLOGIES e 1604 516 8368 Delta BC V3M 6V5 Canada 2 Installing the LabVIEW VIs The LabView VIs are included in the Gocator Integration Tool package e g 14405 4 x x x SOFTWARE Go2 Integration Tools zip under the directory Labview The VIs are structured into four directories Labview library project files Labview Examples Example code that illustrate how to use the public VIs to control the Gocators Labview Private Private files wrapper VIs of Gocator SDK functions Labview Public Gocator Public Vis Users use these VIs to control and acquire data from the Gocator To open the project click Go2Labview lvlb LabVIEW may prompt you for missing GoSdk dll the first time you open the project When prompted choose the GoSdk dll in the Labview Private folder and continue You should see the following screen To get the file paths to show up click Project gt Show Item Path Help Paths C Users Default ADMO006 Desktop 14453 4 0 9 156 SOFTWARE Go2 Integration_
13. ucture that encloses the Receive VI queues up a copy of Gocator Result for every frame of data it receives A Gocator Result could contain one or more output from the Gocator The Process Gocator Result takes the Gocator Result data out of the queue periodically and processes these results Process Gocator Result NES TE EE u 3j ES Height Map E Zan rU 0 bZ7Scale Minimum E Oho Remove invalid values of 32768 ae ESCH Offset ost X Resolution vores mv Offset Toma E Resolution GE ost Z Resolutipn ES Intensity imestamp ncoder encoder index Mei Pren fncoder Index psi bur asc o DOOOOOOOOOSOOOOOSOOSO2OOOOOOOOOOOOOOOOOOOOOOOOOOOOOODO2SOOSOOOOSOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOSOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO2OO2OO2SO2OS DD DM NNNM NNNM NM MNT NNNM MNT MNT MM MM MM MM ND MM MT MM MM NM NNNM Kine P Desch ap I EE Ga l Figure 8 Block for Processing Gocator Results Finally the last part of the code frees the queue when the program exits To avoid race conditions the code that frees the queue only runs when the Receive and Process loops are terminated Page 8 CONFIDENTIAL 222 amp 1604 636 1011 ES info lmi3D com 1673 Cliveden Avenue wf LMI TECHNOLOGIES ends m amp 1604 516 8568 Q www Imi5D com Delta BC V3M 6V5 Canada 4 2 Gocator Result Cluster The Gocator Result cluster is the data structure that carries profile par intensity and measu
14. view Example The Go2Labview controls the Gocator by calling the Gocator Public Vis The detail of each VI is described in section 4 2 The Go2Labview example has two main sections Panel Control and the Gocator Result Processing The Panel Control section is a state machine that handles the interaction of the Panel interface updates the control states and triggers actions when users click on the buttons error in 2 CA Figure 6 The Panel Control state machine This section of the code is also responsible for setting up the Go2 SDK environment and sending the Connect Disconnect Start and Stop commands to the Gocator The other main section of the code handles the results received by the Gocator A cluster called the Gocator Result and defined in Go2 Global vi is used to carry the results around The cluster is defined such that it can carry profile par intensity and measurement results Section 4 2 explains the structure of the Gocator Result cluster A queue is created to buffer the Gocator Results as they are received This is done by the Receive Gocator Result block Page 7 CONFIDENTIAL Canada Get amp 1604 636 1011 fo Imi3D 1673 Cliveden A 4 SS info imisD com iveden Avenue wf LMI TECHNOLOGIES gy 1604 516 8368 Q www ImisD com Delta BC V3M 6V5 Global Queue Global Semaphore There are two threads hence three semaphores Figure 7 Gocator Result Queue and Block for Receiving the Results The case str

Download Pdf Manuals

image

Related Search

Related Contents

  Page 1 Page 2 Page 3 Page 4 Page 5 DIASYSTEM 2100 2200 1  Philips SJM3400H for iPod video 60GB Leather wallet  MODEL 104-DIO-48E and 104-DIO  Forme précoce de la maladie de Parkinson  ATTESTATION DU PRODUCTEUR  Physics 115 Electronics and Instrumentation Laboratory Manual  ASUS ESC4000 User's Manual  Panasonic PV-GS80 Camcorder Accessories User Manual  Bedienungsanleitung Resipod Family  

Copyright © All rights reserved.
Failed to retrieve file