Home

as PDF

image

Contents

1. and others 2 3 1 Analysis of laboratory task The programme should read the values of current and voltage on a photovoltaic cell This is done with two Metex multimeters one connected as a Voltmeter the other as a Amperemeter The values measured by the devices should be displayed on the computer A good solution is to connect the measuring devices to the computer by means of a serial port As there was not a computer available equipped with two RS 232 serial ports it was necessary to use a Delock converter from a RS 232 interface to a USB for one device Although the communication via the RS 232 interface compared to the more advanced USB is rather slow it is wholly sufficient for this task The value from the measurement devices is displayed on the computer screen at once without delay and that is why the programme meets another requirement for the measurement namely the recency of the values displayed Data should further be processed in the structure of tables and simple charts This requirement has been met by using appropriate blocks in the programme which as a result saves data in three columns of a table and then plots the current dependency charts P f I U f 1 and BU f I www intechopen com 44 Modelling Programming and Simulations Using LabVIEW Software Another requirement for the programme function was to provide a option of saving or exporting the measured data into a different programme The measured data
2. 0 of Jezeui A 95 150uuran zd __0 Tes jesdez mwld vuir 1 om g 5uuns Ayoupou rujenisv mimula ww A n e e Joupouy eyingel L A Buss eee Y yu 1 viui T bot or 08 g ot D o01 gig g a le oor nu 0 001 0 08 o o9 oof o nz oo g Sn us 1 I 1 1 1 a 1 i Li Li T dcr oo o 5 D DL o st oz d p sz 3 o oE ise O DE k 0 5t DUE 0 05 5 0 0 0 mE o5 Dean Ej ives 032a ES in D12n mal tues au amp d Juo4 90 8 1 OTOZ 6 EZ uo pajul4d 9b TT Je 4007 S TE uo palyipow se Iesnyod jjouex AJVAxeloJp71H23 L uTvoTO2 MV OXue DAurM A3xe1V Axa IV Q I snxyod I 29584 Fig 24 General view of the front panel of a virtual device www intechopen com Modelling Programming and Simulations Using LabVIEW Software 54 weubeig x org 80 8 3e OTOZ 6 Z uo pajulud Obi TT 3e Z007 S T UO payy pow jse In esnyod 1ouey AJMore o1p7VH23 L UTNOT OZ Vue Vut Axe Vaxoe 1M Q I snyod Fig 25 Block diagram of a virtual device www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW So This is an example of a functioning virtual device which communicates through a serial line with a real measuring device visualizes the measured values and further processes them This is one of the basic uses of Lab VIEW for the construction of a practical application A device constructed in this way or a source cod
3. Software IEC 1997 61000 4 15 cem part 4 Testing and measurement techniques section 15 Flickermeter functional and design specifications International Electrotechnical Commission Lab 2003 LabVIEW User Manual edition part number 320999e 01 edn Lab 2006 LabVIEW Basic I Introduction Course Manual edition edn Slezingr J Drapela J amp Tezky J 2009 Flickermeter implementation in labview Proceedings of the 15th International Scientific and Practical Conference of Students Post graduates and Young Scientists MODERN TECHNIQUE AND TECHNOLOGIES MTT 2009 Tomsk pp 11 13 VIA 2008 User s Guide edition m210906en a edn www intechopen com Te LABVIEW C Modeling Programming and Simulations Using LabVIEW MODELLING PROGRAMMING AND Software p a aos F Edited by Dr Riccardo De Asmundis u c aras ISBN 978 953 307 521 1 P Oj EE Hard cover 306 pages A Publisher InTech em Published online 21 January 2011 BEL nn Published in print edition January 201 1 Born originally as a software for instrumentation control LabVIEW became quickly a very powerful programming language having some characteristics which made it unique simplicity in creating very effective User Interfaces and the G programming mode While the former allows for the design of very professional control panels and whole applications complete with features for distributing and installing them the latter
4. Dup VISA resource name is a copy of the VISA resource name and is transmitted to the next VISA function The WHILE cycle ends once the user has clicked the Stop button which is a representation of the terminal of the same name in the block diagram The node D is responded by the Controls gt String amp Path gt String Indicator see Fig 9 on the front panel where the received string is displayed Fig 9 String Indicator www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 47 When using the port is at an end it should closed for other applications to be able to gain access to it if they request to The closing of the port is done through the Functions gt Instrument I O gt VISA VISA Advanced gt Visa Close node VISA Close see Fig 10 closes the specified session of the device or the resulting object VISA Close accepts all the available categories VISA resource name error in no error error out VISA Close Fig 10 Visa Close The general view of the serial port operation We have two measuring devices connected to the computer over two serial ports Within the programme the serial port operation has to be executed twice The simplest serial communication will be activated by just connecting of all the aforementioned blocks in a row The block connection of the serial port operation for the COM2 port is shown below see Fig 11 VISA O
5. Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 49 Pdopad W m 2 A 0 Fig 15 Numeric Control on the Front Panel and Block Diagram X 2 max x y y BL minix y Max amp Min Fig 16 Max amp Min Max amp Min block downloads the values transferred to its inputs which results in the value on the Max output Using the Multiply block see Fig 14 we will determine the area capacity rating P jon as the product of a maximum performance Pmax and a cell area S The values Pyopaq and Pyign are known to us and using the Divide block we can determine the efficiency of a FV cell The Divide block see Fig 17 executes the quotient of two values transferred to its inputs and the output shows the quotient as the result The quotient and the product could also be determined using the Formula block but the Multiply and Divide blocks are sufficient for calculations this simple Divide Fig 17 Blok Divide The immediate value of efficiency 4 along with the values of Current I Voltage U Performance P Cell Area Sand Impact Performance Pj 5 4 can be displayed on the front panel see Fig 18 The front panel further consists of a table to which we enter the measured values The block for the table is placed in Controls gt Text indicators gt Table see Fig 19 In order to be able to write at the same time the values of current voltage and performance to the table we need to use the M
6. that can be generally called from almost any programmable language and that can use a wide range of differing instruments i e by far not just the serial port There is also a VISA interface for LabVIEW i e for the language G National Instruments recommends using the latter interface for the new applications 2 3 3 Communication with the measuring device The serial port is a system means In order to be able to use it we need to designate it for use in our application This phase of the port use is called opening of the port and in the block diagram it will be realized by the Functions gt Instrument I O gt VISA gt VISA Advanced gt Visa Open node VISA Open see Fig 5 opens sessions for equipment specification and returns a session identifier which can be used to call some other operations of this equipment VISA resource name VISA resource name duplicate session F i error in no error ese me error out pama VISA Open Fig 5 VISA Open with VISA Resource Name constant www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 45 Relevant input parameters A VISA resource name indicates category and source of the open VISA sessions The session does not have to be the correct one Only the category of sessions and the resource name are relevant The relevant output parameters A VISA resource name is the source where a session and its category are opened
7. the considered system of long term online monitoring of data from solar panels the delivered software was inadequate as it did not enable digital access to the measured data It was therefore needed to define and create our own application that would allow for integrating the WXT52O meteostation into the measurement system The core of the problem thus was to create an application within LabVIEW that would be able to communicate with the meteostation using the RS 232 serial interface and would transfer the measured data further on making it available for further processes within the measurement system that has also been programmed in the LabVIEW development programme environment The unique feature of this application is that it enables connection of a device to LabVIEW which does not have a primary support within LabVIEW in the form of measurement card proving universality of the LabVIEW software environment The only supported common communication standard is the serial port RS 232 interface The meteostation includes numerous detectors and sensors see Fig 33 measuring temperature pressure speed of wind rainfall etc where 1 wind transducers 3 pcs 2 precipitation sensos 3 pressure sensor inside PTU module 4 Humidity and temperature sensors inside the PTU module The basis for the communication configuration is the table of wiring of screw terminal pins on the meteostation terminal block based on which the VISA block was set in
8. The category has to match the input VISA resource name A VISA Resource Name constant will be created through right mouse clicking on the node and selecting the Create Constant option on the menu that will appear Then we will define the value of the constant in the pulldown menu We will be able to choose from several options depending on what interfaces are installed in the system at that moment ASRL1 INSTR is the code for the first serial port and similarly ASRL2 INSTR codes the other serial port Next the communication parameters will need to be set i e the Baud Rate speed of communication to 1200 the number of Data Bits to 7 the number of Stop Bits to 2 0 and the level of RTS State control line to Unasserted We will set the parameters for the open port using the Functions Instrument I O VISA VISA Advanced Property Node The Property Node see Fig 6 This node has an adjustable number of input and output terminals In the individual Property Node arrays the required property can be set up Each array is either designed for reading or for entry We will set this property in the menu by the right mouse clicking Change to Read resp Change to Write items To summarize we will choose the needed properties set them for writing and assign values to them using the constants asserted 7 Fig 6 Property Node with the set transmission parameters After that we will use the WHILE cycle and repeatedly ex
9. This bit is included as a simple means of error checking You specify ahead of time whether the parity of the transmission is to be even or odd If the parity is chosen to be odd the transmitter will then www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 41 set the parity bit in such a way as to make an odd number of 1 s among the data bits and the parity bit The transmission in the figure above uses odd parity There are five 1 s among the data bits already an odd number so the parity bit is set to 0 The last part of a character frame consists of 1 1 5 or 2 stop bits These bits are always represented by a negative voltage If no further characters are transmitted the line stays in the negative MARK condition The transmission of the next character frame if any is heralded by a start bit of positive SPACE voltage 2 1 Serial port RS 232 The RS 232 is a standard developed by the Electronic Industries Association EIA and other interested parties specifying the serial interface between Data Terminal Equipment DTE and Data Communications Equipment DCE The RS 232 standard includes electrical signal characteristics voltage levels interface mechanical characteristics connectors functional description of interchange circuits the function of each electrical signal and some recipes for common kinds of terminal to modem connections The most frequently encountered revi
10. string regular expression offset 0 Match Pattern Fig 12 Match Pattern In order to convert a string to a double data type used by all the computing blocks we will use the Fract Exp String To Number block see Fig 13 We will send a string to the string input and on the number output we will obtain a value of the measured quantity in the numerical form that we can already use for calculations em m a dee sum umo mu m gm um Use v SLEPIn Oeil number Fract Exp String To Number Fig 13 Fract Exp String to Number From the serial ports outputs we have obtained the Voltage U and Current I values flowing through the FV photovoltaic cell We will calculate the Performance P value by using the Multiply block see Fig 14 which can perform multiplication between the numbers brought to the input x and y and their product then appears on the output ne et Y Multiply Fig 14 Blok Multiply We will set the value of an impact performance Pyopad to be calculated based on pyranometer sensitivity and pyranometer output voltage using the Numeric Control see Fig 15 block This we will find within Controls Numeric Controls Numeric Control on the Front Panel Similarly we will also set the size of area S Before calculating efficiency a maximum performance Pmax of a FV cell yet needs to be determined We will obtain the maximum value by using a Max amp Min block see Fig 16 The www intechopen com
11. 3 Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW Jan Machacek Jan Slezingr and Jiri Drapela Brno University of Technology Czech Republic 1 Introduction We need to measure both electric and nonelectric quantities solving the series of problems in power engineering Graphical programming environment of the program LabVIEW seems to be useful helper and provides good tool for measuring both an automatic independent measurements of specific tasks using measuring cards and instruments The LabVIEW belongs to widely used measuring tools at Department of Electrical Power Engineering Faculty of Electrical Engineering and Communication power engineering Brno University of Technology Since the LabVIEW is used to solve a number of projects at our department and there is only limited space in this article we decided to mention only the most interesting ones The first project deals with measuring operating characteristics of the photovoltaic cell It consists of standard interconnection of measuring devices producer Metex which measure data that are transferred by program LabVIEW to the computer Next the data are mathematically and graphically processed Different projects in LabVIEW offer a wide spectrum of front panels in the framework of this program allowing to connect each measuring device by its specific way Some of them are listed here Another of the many tasks developed at our department is an auton
12. ast to text based programming languages where instructions determine www intechopen com 40 Modelling Programming and Simulations Using LabVIEW Software program execution LabVIEW uses dataflow programming where the flow of data determines execution In LabVIEW you build a user interface with a set of tools and objects The user interface is known as the front panel You then add code using graphical representations of functions to control the front panel objects The block diagram contains this code In some ways the block diagram resembles a flowchart 2 Serial communication between LabVIEW and simple meter Serial communication requires that you specify four parameters the baud rate of the transmission the number of data bits encoding a character the sense of the optional parity bit and the number of stop bits Each transmitted character is packaged in a character frame that consists of a single start bit followed by the data bits the optional parity bit and the stop bit or bits A typical character frame encoding the letter m is shown here Lab 2006 id be Start Data Parity Stop Idle bit bits bit bits Space Bit time Character frame Fig 1 Typical character frame encoding the letter m Lab 2006 Baud rate is a measure of how fast data is moving between instruments that use serial communication RS 232 uses only two voltage states called MARK and SPACE In such a two state coding scheme the baud rate is i
13. at will modify the magnitude of voltage Slezingr et al 2009 The card s inputs are galvanically separated and properly isolated so it is possible to bring the mains voltage potential to the input terminals This allow for using the voltage modification with a resistance voltage divider proven to provide the highest accuracy and linearity in the broad frequency range Voltage measurement for the flickermeter in the LabView block diagram is taken by means of express VI DAQ Assistant from the Input palette The assistant automatically finds the measurement cards connected to the computer and mediates their configuration by the user The measurement card is then represented by a single block in the block diagram whose output is a data flow with an excessive quantity The measurement card connection is detailed in the LabView Help For the purpose of flickermeter operation it was necessary to set an Acquire Continuously option in the Task Timing tab A sampling frequency is set for the required 3200 S s The sampling frequency selection has to be made right at the start of flickermeter designing as all the filters used are specified using constants that depend on the sampling frequency 3 4 Simulation of the light source eye brain chain The block of signal normalization includes the measurement of input voltage effective value and calculates a maximum value The input signal is normalized to a unit amplitude signal www intechopen com 58 Mo
14. delling Programming and Simulations Using LabVIEWTM Software The simulation of the light source ye brain chain is performed as a cascade of filters The filters used in the flickermeter are designed as a cascade of digital filters There is IIR Filter used from the Signal Processing gt Filters gt Advanced IIR Filtering menu The transmission function of this filter is specified using Forward Coefficients and Reverse Coefficients in the form of array of coefficients The array is set up using the Build Array block A TRUE signal to the init cont input is also transferred to the input of the TIR Filter block for the signal filtering to go on continually for the whole period of the programme run Hanzelka amp Bien 2000 The complete solution of one of the filters is shown in see Fig 29 T 1 907 SBS 392699396 eg jJ D 001 12557232160715 3 12 T Lee 4 1 002251 14464321425 D ER 1 001 10745409161227 0 00112557232160715 0 001 1596159248 3097 LPEW Fiber 2lsec Fig 29 Block diagram of the constructed filter 3 4 1 Problems relating to filter stability The practical implementation of the digital filters within LabView has indicated an increased likelihood of filters becoming unstable if the transmission function of the filter is higher than the second order of magnitude It is therefore useful to transform transmission functions of the higher orders to a product of transmission functions
15. dentical to the maximum number of bits of information including control bits that are transmitted per second MARK is a negative voltage and SPACE is positive the previous figure shows how the idealized signal looks on an oscilloscope The truth table for RS 232 is Signal gt 3 V 0 Signal lt 3 V 1 The output signal level usually swings between 12 V and 12V The area dead between 3 V and 3 V is designed to absorb line noise A start bit signals the beginning of each character frame It is a transition from negative MARK to positive SPACE voltage its duration in seconds is the reciprocal of the baud rate If the instrument is transmitting at 9600 baud the duration of the start bit and each subsequent bit will be about 0 104 ms The entire character frame of eleven bits would be transmitted in about 1 146 ms Data bits are transmitted upside down and backwards That is inverted logic is used and the order of transmission is from least significant bit LSB to most significant bit MSB To interpret the data bits in a character frame you must read from right to left and read 1 for negative voltage and 0 for positive voltage For the figure above this yields 1101101 binary or 6D hex An ASCII conversion table shows that this is the letter m An optional parity bit follows the data bits in the character frame The parity bit if present also follows inverted logic 1 for negative voltage and 0 for positive voltage
16. dicators are placed on the front panel The input voltage curve Pf current value and Pst measured results are displayed on the graphic displays The text indicator displays information about the current status of the meter Three possible states may take place starting the meter with counting down the time period for which it has to wait for the initial transient performance to pass Wait status when the flickermeter stands by and waits for the START button to be pressed This status takes place after the set time for the meter s starting lapsed or after the STOP button is pressed status of data accumulation for subsequent calculation of Pst value while counting down the remaining time of accumulation This state stays active after pressing the START button until the STOP button is pressed or the time of accumulation has lapsed and the Pst calculation is made The Pst value will always be overriden with the latest value on the display after the time of accumulation lapsed www intechopen com 60 Modelling Programming and Simulations Using LabVIEW Software The flickermeter is programmed so as to enable using of the measured values also as a data source for further VI running on the same computer The flickermeter is part of a comprehensive measurement system that can remote start the flickermeter and read the measured results using global variables Fig 31 Block diagram of the timer The general view of the user inter
17. e can be further compiled to form a separate application independent of the LabVIEW programming environment The following picture is just a sample design of Metex a simple virtual device communicating through a serial port 0 3 0 4 0 5 0 6 0 7 0 8 0 9 1 Fig 26 Block diagram of a Metex 4560 cr virtual device VISA configurator module is used again for communication via a serial port which is however part of a sub vi application The other blocks are just the means to process control and display data A detailed analysis of this application however is not the focus of this paper 3 Flickermeter in the LabVIEW environment 3 1 Introduction One of the major problems in regard to the quality of electric power involves quick changes in the voltage i e its fluctuation causing flickering of the light flow from the light sources The light flow flickering may subsequently create an undesired perception of flickering which adversely impacts visual performance This is a subjective visual impression initiated by a light stimuli whose brightness or spectral distribution changes in time The flickering of light sources may cause mental or physical fatigue or major physiological discomfort in people Voltage fluctuation may be caused by interference during the generation transmission distribution and consumption of electricity The voltage fluctuation in the grid may be due especially to the fluctuation of active and reac
18. ecute entering of the CD command to the port and reading of the string fourteen symbols for the Metex multimeters from the port The Functions Instrument I O VISA VISA Read node is used for reading and the Functions gt Instrument I O VISA gt VISA Write node for writing VISA Read see Fig 7 the function is reading the prescribed number of bytes from the designated device or interface www intechopen com 46 Modelling Programming and Simulations Using LabVIEW Software dup VISA resource name read buffer error out VISA resource name byte count error in no error VISA Read Fig 7 VISA Read Relevant input parameters A VISA resource name determines which interface will be opened This parameter has the defined values of the ports named COMI COM2 and LPT1 Byte count is the amount of bytes to be loaded to the buffer 14 in our case Dup VISA resource name is a copy of the VISA resource name and is transmitted to the next VISA function Relevant input parameters Read buffer transmits the symbols read from the entered interface VISA Write see Fig 8 Enters data from the write buffer to the device or interface specified in the VISA resource name VISA resource name VISA TH dup VISA resource name write buffer rax return count error in no error w error out VISA Write Fig 8 VISA Write Relevant input parameters write buffer contains data to be entered in the device
19. er interface from which the system can be administered as a whole The final part of the paper also deals with a possibility of connecting LabVIEW to and its communication with a non standard instrument which is not primarily designed for the communication with LabVIEW As it has turned out provided that standards of the communication interface are complied with in our case the RS 232 protocol the connection can be basically made without difficulty This makes LabVIEW a universal software in the sphere of virtual instrumentation 6 Acknowledgment This paper includes the results of research funded by the Ministry of Education Youth and Sports of the Czech Republic as part of project No MSM 0021630516 and project No CZ 1 05 2 1 00 01 0014 Centre for Research and Utilization of Renewable Energy 7 References Hanzelka Z amp Bien A 2000 Guide to quality of electrical supply for industrial installations part 5 flicker and voltage fluctuations Technical report Power Quality Working Group WG2 Tomsk www intechopen com 65 Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW OT 8 Je OTOZ 6 z uo pejuud 9T T Je OTOZ Z Tz uo paljipow jse MISST DZSIKM 60 QVejeserAV Ax e opzVH23 L uTVOT O2 Mrjue um Axa A1x2 LO 1591 O0ZS1XM 60 0 Fig 37 Block diagram of the communication and control programme www intechopen com 66 Modelling Programming and Simulations Using LabVIEW
20. erge Signals see Fig 19 block which will merge the signals into a single one which we will bring to the single input of the table We can set the number of columns and rows in the table in our case 3 columns and 20 rows The options further provide for the display of headings for columns and rows and of a scroll bar www intechopen com 50 Modelling Programming and Simulations Using LabVIEWTM Software Fig 18 Current values on the Front panel Fig 19 Table of values with Merge Signals block and tabs for entry and deletion On the front panel of the table we can see the values of current voltage and performance in the columns see Fig 20 We will enter values into the table by bringing Log 1 to the Enable input and perform the table deletion by bringing Log 1 to the Reset input These operations are executed by means of two tabs on the Front panel to be found in the Controls gt Buttons amp Switches gt Text Button see Fig 20 We can plot the measured values in charts there were three dependence charts needed for this task specifically VA characteristic U f I Performance characteristic P f D and Performance as well as VA characteristics in a single chart U P f I To create the charts we chose three Build XY Graph blocks see Fig 21 to be found in the Controls gt Graph Indicators gt XY Graph Each block of the chart has two inputs for the values x and y on the axis and further inputs for enabling Entr
21. face of the flickermeter is as shown on the following page y E ii M s vs a A 71 i R M b In 3 9 el i Fig 32 Block diagram of the timer The flickermeter has been verified by the tests required by the standard Its response to the test signals is fully compliant with its requirements and it now used within the development of the new types of the meter www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 61 The described meter is now used as a reference device in the research of new constructional solutions of the flickermeter and in the development of a generator of different kinds of disturbance voltage fluctuations It can be operated on any kind of computer with a measurement card connected It can be built into comprehensive systems focusing on the area of electric power quality based on virtual instrumentation 4 Communication and control of Viasala WXT520 meteostation in LabVIEW environment Finally the communication of LabView and a Viasala WXT520 meteostation is described The meteostation is part of an extensive measurement system which on a long term basis monitors electrical and physical quantities of the system of solar panels A picture of a meteostation is shown in 33 The meteostation delivery also included configuration software which though can only be used for meteostation configuration and testing of meteostation With regard to the needs of
22. flickermeter 3 2 Implementation of the flickermeter in the LabView environment The flickermeter construction is based on the study of human brain reaction to flickering light The description of a flickermeter function and its detailed specification is included in the EN 61000 4 15 standard see IEC 1997 The flickermeter function has been described in the introduction It evaluates the course of voltage and provides a Pst value for the output which expresses the degree of flicker perception by the normalized observer www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW oF The flickermeter described in the standard is an analogue measuring device The present day digital measuring devices use a modified version of the standard flickermeter S transmission functions of analogue filters used for describing the device in the standard have been transformed into a digital form using bilinear Z transformation UIE IEC flickering meter model was constructed as a virtual device within LabView It is made up of the following basic blocks voltage measurement input signal normalization filtration and weighting statistical analysis Fig 28 Block diagram of a virtual device 3 3 Voltage measurement The voltage measurement uses the NI PXI 4472 measurement card which is able to measure voltage in the range 1OV To measure the mains voltage it is necessary a ballast th
23. he timeout value for the serial communication Baud rate data bits parity and flow control specify those specific serial port parameters The error in and error out clusters maintain the error conditions for this VI Lab 2003 The example above shows how to send the identification query command IDN to the instrument connected to the COM2 serial port The VISA Configure Serial Port VI opens communication with COM and sets it to 9600 baud 8 data bits odd parity one stop bit and XON XOFF software handshaking Then the VISAWrite function sends the command The VISA Read function reads back up to 200 bytes into the read buffer and the error condition is checked by the Simple Error Handler VI www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 43 Sj ASRLZ INSTR iby lv A stop bis ft0 flow control XON XOFF v Fig 4 The example of configuration Lab 2006 2 3 Specific application of serial communication in LabVIEW The aim of the study was to create a measurement programme within a Lab VIEW programming environment for a laboratory task of efficiency measurement of photovoltaic conversion The use of the programme has brought the following benefits digitalization of measurement automation of measurement archiving of measured values easy further processability of values immediate graphic processing speed of measurement
24. ing Programming and Simulations Using LabVIEW Software Dr Riccardo De Asmundis Ed ISBN 978 953 307 521 1 InTech Available from http www intechopen com books modeling programming and simulations using labview software electric and nonelectric quantities measurement in power engineering using labview INTECH open science open minds InTech Europe InTech China University Campus STeP Ri Unit 405 Office Block Hotel Equatorial Shanghai Slavka Krautzeka 83 A No 65 Yan An Road West Shanghai 200040 China 51000 Rijeka Croatia HEATERS Ef E En ABA RIE DAE 405 ETC www intechopen com Phone 385 51 770 447 Phone 86 21 62489820 Fax 385 51 686 166 Fax 86 21 62489821 www intechopen com
25. lling Programming and Simulations Using LabVIEW Software Function signal pin 25 pin DTE DCE 132132 Bap ep a RO Hus 7 a Output pat ers 8 5 Input Output Handshake DSR 6 6 input Output DeD 1 8 Input Output Common Cm 5 7 Omer RI 9 22 Input Output Table 1 Lines of serial interface Lab 2006 specified in the standard The table shows only the core set of pins that are used for most RS 232 interfaces Lab 2003 2 2 Control of serial port in LabVIEW The LabVIEW Instrument I O Serial subpalette contains functions and VIs used for serial port communication You should notice that some of the functions in this subpalette are the VISA functions you used previously for GPIB communication The VISA Write and VISA Read functions will work with any type of instrument communication and are the same whether you are doing GPIB or serial communication However because serial communication requires you to configure extra parameters you must start the serial port communication with the VISA Configure Serial Port VI termination char 0x4 timeout 10sec VISA resource name baud rate 9600 data bits 8 parity none error in no error flow control 0 None Fig 3 VISA configure serial port Lab 2006 duplicate VISA resource name error out The VISA Configure Serial Port VI initializes the port identified by VISA resource name to the specified settings Timeout sets t
26. of the lower orders of magnitude 3 4 2 The programme run The complete flickermeter is created as a programme loop named WhileLoop with 1 s programme delay using the TimeDelay block Within each step of the loop a block of 3200 samples is read from the measurement card and data is transformed from the DynamicData type to the Array data type which is processed by individual filters The filters output is a single value for each block denoted as Pf of immediate degree of perception of flickering Pf values are saved in an accumulator designed as Express VI Collector during each individual passage of the loop It accumulates values for a period of time required for calculation of the PST value typically 10 minutes though the programme allows for different times of accumulation too www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 59 3 4 3 Statistical signal analysis An array of values is again placed on the accumulator output administered in a statistical classifier whose block diagram is represented here below The classifier function is consistent with the description within the standard The number of classes required by the standard is minimally 64 the constructed algorithm uses 10000 of them n id m 10 n a B 4 5 6 d 9 10 m 14 Fig 30 Statistical evaluation of data 3 4 4 The flickermeter control START and STOP pressbuttons and Pf and Pst in
27. omous measurement of electric and non electric quantities of photovoltaic and wind power installation A specific part of this project included the connection of meteorological station VIASALA which required a particular set of control interfaces created by LabVIEW The LabVIEW environment has also created a comprehensive measurement system for detection of resistance of modern light sources to interference in the voltage supply as well as a system to test and develop devices to measure the flickering of light sources The system is implemented on the PXI platform First describes control of serial communication in LabVIEW software here because serial communication is a popular means of transmitting data between a computer and a peripheral device such as a programmable instrument or even another computer Serial communication uses a transmitter to send data one bit at a time over a single communication line to a receiver You can use this method when data transfer rates are low or you must transfer data over long distances Serial communication is popular because most computers have one or more serial ports so no extra hardware is needed other than a cable to connect your instrument to the computer or two computers together In many applications the electronics takes advantage of the LabVIEW program provides It is mainly the fact that LabVIEW is a graphical programming language that uses icons instead of lines of text to create applications In contr
28. on and configuration of individual sensors repeated reading of data from the meteo station in set intervals display and entry of values 5 Conclusion The paper describes a few examples of using LabVIEW for the measurement of electric and non electric quantities in electro energy applications The most frequently involved is evidently the LabVIEW communication with a measuring device using a serial port but there are also applications putting it to good use such as the described flickermeter which is constructed directly on the NIPXI platform distributed by the National Instruments company Through virtual instrumentation and launching of LabVIEW the simplification and greater effectiveness of the design have been achieved and the same has in turn been applied in the construction of new laboratory tasks and research measurements The described examples www intechopen com 64 Modelling Programming and Simulations Using LabVIEW Software Fig 36 User interface indicate possible use of LabVIEW as a concentrator of individual measuring devices and peripheries which can be customized based on user requirements Its operation is based on a single measurement interface which combines all the varied instruments used and visualizes archives and processes the measured data and if necessary also transmits it to another part of the measurement system An integral part of the programme is the possibility of creating an effective us
29. pen usagead piecn eteiee ASR esa T vea uU labe tome DataBits 1260 gt RTS State DI _ He write buffer byte count Fig 11 Operation of Serial Port 2 3 4 Data processing calculations We have activated the serial port in the Lab VIEW environment and the measuring devices have already been sending data to the programme in regular intervals The data is however of the String data type which cannot be used for calculations and so the data type needs to be changed Moreover the string sent by the multimeter also contains an abbreviation relating to the measured quantity and a unit of the given quantity blocks for the transmission of the data type would not be able to convert the values and it is therefore necessary to remove all symbols except for digits from the string Match Pattern see Fig 12 is an appropriate block for removing of selected symbols from the string The input parameters of the block include a string where a string is loaded for filtering and a regular expression that contains symbols that will be retained in the string In our case we wish to leave all the digits and a sign in place the regular expression therefore contains a www intechopen com 48 Modelling Programming and Simulations Using LabVIEW Software string of the necessary symbols The resulting output is a match substring which only contains digits and a sign before substring match substring after substring offset past match
30. programme This is enabled by one block that asks the user to enter the file name and path to the file The data is saved in the way as shown in the table The LabVIEW programme creates files with a LVM suffix LabVIEW Measurement that can be opened in any text editor e g NotePad MS Word 2 3 2 Programme analysis As mentioned above programmes are created within Lab VIEW through merging blocks In the programme for measurement only some of the great amount of those prepared in advance were used Serial communication surely belongs to the essential parts of the programme There is more than one way within Lab VIEW to effecting serial communication within the measuring device and the computer Within the Functions gt Instrument I O gt Serial palette we will find nodes for communication with a serial port These are now referred to as old fashioned Their use is no longer recommended at present They are included in the palette to provide compatibility with the earlier applications The author had difficulty operating the control lines of the serial port using these functions The other possibility of operating the port is to use e g library dll which exports the relevant functions The author though has not used the mentioned procedure either The National Instruments company has developed a higher level comprehensive interface for the control of peripheries named NI VISA This is basically a set of what is called API functions
31. represents an innovative way of programming the graphical representation of the code The surprising aspect is that such a way of conceiving algorithms is extremely similar to the SADT method Structured Analysis and Design Technique introduced by Douglas T Ross and SofTech Inc USA in 1969 from an original idea by MIT and extensively used by the US Air Force for their projects LabVIEW enables programming by implementing directly the equivalent of an SADT actigram Apart from this academic aspect LabVIEW can be used in a variety of forms creating projects that can spread over an enormous field of applications from control and monitoring software to data treatment and archiving from modeling to instrument control from real time programming to advanced analysis tools with very powerful mathematical algorithms ready to use from full integration with native hardware by National Instruments to an easy implementation of drivers for third party hardware In this book a collection of applications covering a wide range of possibilities is presented We go from simple or distributed control software to modeling done in LabVIEW from very specific applications to usage in the educational environment How to reference In order to correctly reference this scholarly work feel free to copy and paste the following Jan Machacek Jan Slezingr and Jiri Drapela 2011 Electric and Nonelectric Quantities Measurement in Power Engineering Using LabView Model
32. sion of this standard is called RS 232C Parts of this standard have been adopted with various degrees of fidelity for use in serial communications between computers and printers modems and other equipment The serial ports on standard IBM compatible personal computers follow RS 232 Lab 2003 Devices that use serial cables for their communication are split into two categories These are DCE Data Communications Equipment and DTE Data Terminal Equipment DCE are devices such as your modem TA adapter plotter etc while DTE is your computer or terminal RS 232 serial ports come in two sizes the D Type 25 pin connector and the D Type 9 pin connector Both of these connectors are male on the back of the PC thus you will require a female connector on your device Below is a table of pin connections for the 9 pin and 25 pin D Type connectors Lab 2006 a DB 9 connector and pinouts b DB 25 connector and pinouts Fig 2 Serial connectors The 9 pin s connector is occasionally found on smaller RS 232 lab equipment It is compact yet has enough pins for the core set of serial pins with one pin extra Important The DB 9 pin numbers for transmit and receive 3 and 2 are opposite of those on the DB 25 connector 2 and 3 Be careful of this difference when you are determining if a device is DTE or DCE The 29 pin s connector is standard RS 232 connector with enough pins to cover all the signals www intechopen com 42 Mode
33. the block diagram of the measurement application www intechopen com 62 Modelling Programming and Simulations Using LabVIEW Software Fig 33 Meteostanice WXT520 Viasala VIA 2008 Fig 34 Cut away view VIA 2008 www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 63 RS 232 SD4 12 RS 485 R amp 422 Pin 83 E ips CS Z WX E EL ipsae Darm IR TX Data out TxD Dia ivoul Tx Data Data oi ITE 3 aT Date Daaon x 3 pe GND for Vh GND for Vh GND for Vine 18 HGe Whe heating Vie heating Wine heating io viN GNDfo Vins GND for Vim GND for Vim GND for Vine 20 WIN Vine operating Vine operating Vins operating Vin operating Fig 35 Connection of pins for different VIA communication interfaces VIA 2008 As can be seen from the block diagram of the application see Fig 37 it was necessary to configure a number of further variables to ensure the correct function such as the following channel selection measurement interval input port communication protocol Subsequently the complete programme was created whose user interface is shown below see Fig 36 The logic of the programme is roughly outlined by the following setting of inputs on off measurements definition of channels ports etc definiti
34. ting to the table to the charts and the file to a single tab since these operations should be started at the same point in time The programme should save data www intechopen com 52 Modelling Programming and Simulations Using LabVIEW Software U V u n ES P f 1 Pef t Mag 40 0 35 0 5 30 0 25 0 Fig 22 Grafy na poednim panelu to a single file give the user a possibility of choosing a path to the file and the file name and that is why I have chosen to use t Action gt Save to one file gt Ask user to choose file gt Ask only onet in the block setting During the first measurement a dialog box appears to save a file see Fig 23 Within the block setting you can further select display of a heading for a file and time of measurement To delete the content of a file we use the DELETE tab which is common for the table and the chart The LabVIEW programme creates files with a LVM suffix LabVIEW Measurement that can be opened in any text editor Select a file to save Ulo it do bakalarka 15 Posledni Dokumenty A Tento po ta E Mista v siti N zev soubor hodnoti Ulodit jako typ LabVIEW Measurement Ivm Fig 23 Dialog box for writing to a file Overall view of the front panel and the block diagram is shown below www intechopen com 53 Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW
35. tive power of some appliances In order to measure the degree of perception of flickering was developed a UIE IEC flickermeter which based on the measurement of voltage fluctuations evaluates the corresponding level of perception of flickering The flickermeter models the transmission www intechopen com 56 Modelling Programming and Simulations Using LabVIEWTM Software Stacked Sequence Structum NDS 3 0 3 vbi 0 9 pnumkMOhVAHsFL READ DK 14 e a iy I q3 X Emm TUT Ci LLL et et ee eee um P ds PP recision cH m wj Fig 27 Block diagram of a virtual device function of the light source and eye and the memory effect on the brain The function of flickermeter is based on two critical activities simulation of the light source eye brain chain and the statistical analysis of the output signal in real time The light source modelled within the construction of flickermeter is a light bulb with a 60 W power and double coiled filament rated for 230 or 120 V voltages The flickermeter is typically implemented as a function in the measuring devices designed for monitoring of the quality of electricity in the electrical networks For the research purposes regarding the development of new types of flickermeter a standard flickermeter has been implemented in the Labview environment at the Department of Electrical Power Engineering The meter is used as a reference instrument for the new development constructions of
36. y and Deletion that we will connect similarly as for the block of the table to the tabs ENTER and DELETE www intechopen com Electric and Nonelectric Quantities Measurement in Power Engineering using LabVIEW 51 U V I mA P mw 6 439000 6 600000 3779400 6 404000 36300000 14 6500 0 399000 39 0000 _ 15 521100 0 339000 __j64 so000o 21611700 0 297000 __ 72 100000 21 413700 CL NE MC M demo I 00m jose aise une m Fig 20 Table with measured values tabs for entering values and deletion on the right Fig 21 Build XY Graph block with entry and deletion tabs The window of the chart on the front panel is displayed as shown see Fig 22 In order to be able to display multiple courses on the chart U P f I we need to again use the Merge Signals block and select two axes and two courses in the chart setup The chart options include the setting of the cursor and further the setting of colours of the courses curves and the cursor The chart can connect points values in several ways though any connecting line of a trend linear logarithmic cannot unfortunately be used here as provided e g within the MS Excel programme After the measurement of data the next step involves its saving The Write LabVIEW Measurernent File block see Fig 23 was used to save the data in a file This block is located in the Function gt Output gt Write LabVIEW Measurement File in the Block diagram I have connected the wri

Download Pdf Manuals

image

Related Search

Related Contents

Digicharger D2    User Manual  2013 Secondary School Performance Tables KS4 June Exercise  DigitalFlow™ XGS868i - GE Measurement & Control  Samsung RF25HMEDBSR/AA Energy Guide  Bedienungsanleitung Gasgrill Ontario  Warehouse of Tiffany RL1131 Instructions / Assembly  販売契約約款 - J-com  Gefen DVI 1500HD  

Copyright © All rights reserved.
Failed to retrieve file