brief introduction for the graphical programming language ... · 1. introduction this brief...

8
08.10.2015 Brief introduction for the graphical programming language Labview™ for the GPS Digital Colour Analyzer GPS Prüftechnik GmbH www.gps-prueftechnik.de E-Mail: [email protected]

Upload: others

Post on 19-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Brief introduction for the graphical programming language ... · 1. Introduction This brief introduction gives supports to program the GPS Digital Colour Analyzer with Labview™

08.10.2015

Brief introduction for the

graphical programming language Labview™

for the GPS Digital Colour Analyzer

GPS Prüftechnik GmbH

www.gps-prueftechnik.de

E-Mail: [email protected]

Page 2: Brief introduction for the graphical programming language ... · 1. Introduction This brief introduction gives supports to program the GPS Digital Colour Analyzer with Labview™

08.10.2015 2

GPS Colour Analyzer Project 1. Introduction 2. Subroutines RS232 Open.vi RS232 GetVersion.vi RS232 Get Serial.vi RS232 GetHW.vi RS232 Read.vi RS232 Write.vi RS232 Message.vi RS232 testCon.vi RS232 CaptureStandard.vi RS232 CaptureManual.vi RS232 GetRGBI.vi RS232 GetXY.vi RS232 GetHSI.vi RS232 GetCTemp.vi RS232 convert RGBi to RGB Prozent.vi

3. Strict Type Def Type Sensor area selection.ctl Type Sensor range selection.ctl Type Time range selection.ctl Type Measurement selection.ctl Type RGBi.ctl Type RGB Prozent.ctl Type XY.ctl Type HSI.ctl Type_Main_status.ctl Type_Queue_Msg.ctl Type_Pieces_of_Boards.ctl Type_Number of_Led.ctl

4. Test.vi 5. GPS Analyzer Main Loop

Page 3: Brief introduction for the graphical programming language ... · 1. Introduction This brief introduction gives supports to program the GPS Digital Colour Analyzer with Labview™

08.10.2015 3

1. Introduction This brief introduction gives supports to program the GPS Digital Colour Analyzer with Labview™. The programming is based on the manual for the Digital Colour Analyzer and its command list. The programs has been created with Labview™ 2010 Base Development System (base system). All subroutines and type definitions which can be used to communicate with the GPS-LED Analyzer are stored in the project GPS LED Analyser.lvproj . The program GPS Main Analyser.vi demonstrates how the SUB-Vis und Type-Defs of the command list can be used in a state machine.

2. Subroutines

The subroutines „SUB-VIs“ are presented by its command structure.

RS232 Read.vi

Reading feedback signals of the Analyzers

RS232 Open.vi Provides the pre-adjustment of the Port with which the Digital Colour Analyzer communicates. For the input the attached com–port can be selected by using a „VISA resource name„ . The actual baud rate is 115200 and applies for all boards from firmware 1005. At boards with firmware< 1005 the baud rate should be set to 57600.

RS232 Write.vi

Writing commands for the Analyzers

RS232 Message.vi

Writing and reading commands for the Analyzers

Page 4: Brief introduction for the graphical programming language ... · 1. Introduction This brief introduction gives supports to program the GPS Digital Colour Analyzer with Labview™

08.10.2015 4

RS232 CaptureStandard.vi

RS232 CaptureManual.vi With a Sensor Range the image area of the photo sensor can be set to 3x3 or 9x9 and different capture times can be selected to this: DISABLE UTH 3x3 10 ms ULT 3x3 20 ms SUP 3x3 60 ms HGH 3x3 120 ms MED 3x3 200 ms LOW 3x3 600 ms ULT 9x9 20 ms SUP 9x9 60 ms HGH 9x9 120 ms MED 9x9 200 ms LOW 9x9 600 ms Feedback signal „ok“

Get a 4 digits serial number of the Analyzer (example „0149“)

RS232 GetHw.vi

Get a 7 digits hardware version number (example„GPS 5-1“)

RS232 GetVersion.vi

Get a 4 digits firmware version number (example „1005“)

RS232 testCon.vi

Connection test Feedback signal „ok“ Feedback signal „Number of connected boards“ This command has to be sent as first command so that all Connected boards can be identified.

This authorizes the Analyzer to capture and store the colour and Intensity of all connected boards simultaneously. Feedback signal „ok“

Page 5: Brief introduction for the graphical programming language ... · 1. Introduction This brief introduction gives supports to program the GPS Digital Colour Analyzer with Labview™

08.10.2015 5

RS232 GetRGBi.vi

Get stored values for RGB und Intensity

RS232 GetXY.vi

Get stored value for XY Chromaticity

RS232 GetHSI.vi

Get stored values for HUE, Saturation and Intensity

RS232 GetCTemp.vi

Get stored value for Colour Temperature

RS232 Convert RGBi to RGB Prozent.vi

Converts the received values for RGB into per cent

Page 6: Brief introduction for the graphical programming language ... · 1. Introduction This brief introduction gives supports to program the GPS Digital Colour Analyzer with Labview™

08.10.2015 6

3. Strict Type defs

Type Sensor range selection.ctl Enum of 12 elements Pre-selection sensor area and capture time (see RS232 CaptureManual.vi)

Strict type definitions are customer controlled data files in which modifications can be carried out easily. The modification of the file (*.ctl) has an effect on all elements of the programs and its subroutines, so that not each VI has to be modificated.

Type Time range selection.ctl Enum of 10 elements Pre-selection capture time : from 2 to 600ms

Type Measurement selection.ctl Enum of 4 elements Pre-selection capture type: XY files , RGBi, HSI, Colour Temperature

Type Sensor area selection.ctl Enum of 3 elements Pre-selection sensor area: 3x3, 9x9 or not available

Type RGBi.ctl Cluster of 4 elements Red, Green, Blue, Intensity

Type RGB Prozent.ctl Cluster of3 elements Red in %, Geen in %, Blue in %

Type XY.ctl Cluster of 2 elements X– and Y-value, value range 0-1 with 4 decimal places

Type HSi.ctl Cluster of 3 elements Hue, Saturation und Intensity

Type_Main_status.ctl Enum of 5 elements Main state : init - idle - Getdata –error– stop

Type_Queue_Msg.ctl Cluster of 2 elements Element data type for the data exchange of the communication loop with the capture loop

Type_Pieces_of_Boards.ctl Ring of 20 elements Selection of the boards which are ready for communication Actually up to 20 boards are accessible Up to 99 boards can be implemented

Type_Number_of_Led.ctl Ring of 5 elements Selection of the channels of a chosen Analyser max. 5 channels per board can be activated

4. Test.vi Test.vi integrates all relevant Sub.vis in combination with a For loop. All connected boards and their 5 channels are run through this.

Page 7: Brief introduction for the graphical programming language ... · 1. Introduction This brief introduction gives supports to program the GPS Digital Colour Analyzer with Labview™

08.10.2015 7

Block diagram

Get Data button

Front panel

Run button

5. GPS Analyzer Main Loop

With the program GPS Analyser main loop.vi captured values for Red, Green, Blue, Intensity, XY-Chromaticity, Hue, Saturation and Colour-Temperature can be called up separately. With „VISA resource name“ the available com-port is selected. Via the selection window „Measurement Selection“ “ one can choose between RGBI, XY Data, HSI and Colour Temperature. With Sensor Range / Measure Time the image area of the photo sensor and the captured time can be set. Via Board and Fiber the channels 1-5 of all connected boards can be selected. The run button of the menu bar starts the main loop of the state machine. By pressing the Get Data button a measuring process is activated.

Page 8: Brief introduction for the graphical programming language ... · 1. Introduction This brief introduction gives supports to program the GPS Digital Colour Analyzer with Labview™

08.10.2015 8

Weitere Unterstützung zur Programmierung unseres Digital Color Analyser erhalten Sie gerne. Bitte rufen Sie uns an oder senden Sie uns Ihre Frage an [email protected]

© Copyright 2005-2009 by GPS Prüftechnik GmbH. All rights reserved. No parts of this manual may be reproduced or retransmitted in any form or means, electronic or mechanical, including photocopying, recording, or any other storage

and retrieval system without prior permission in writing from GPS Prüftechnik GmbH.

GPS Gruppe Vertriebsbüro Süd: Büro Ungarn: Hermann-Löns-Str. 1 GPS Prüftechnik Kft. D-82216 München/Gernlinden Zrínyi Miklós utca 105 Telefon +49-8141-52 747-14 HU-8900 Zalaegerszeg Telefax +49-8141-52 747-47 Telefon +36-92 510-740 Telefax +36-92 510-741 Büro Rhein/Main: Büro Schweiz: GPS Prüftechnik Rhein/Main GmbH GPS Prüftechnik AG Ferdinand-Porsche-Str.17 Täfernstrasse 31 D-63500 Seligenstadt CH-5405 Baden-Dättwil Telefon +49-6182-89 37-0 Telefon +41-56-483 25 80 Telefax +49-6182-89 37-37 Telefax +41-56-483 25 89 Büro Nord: Vertriebsbüro Ost: GPS Prüftechnik GmbH Dieter Boldt Steigerring 25 Olwenstraße 26 D-59075 Hamm D-13465 Berlin Telefon +49-2381-99 110-0 Telefon +49-30 - 401 19 03 Telefax +49-2381-99 110-99 Telefax +49-30 - 401 00 816 Internet: gps-prueftechnik.de E-Mail: [email protected]