Home
AN105
Contents
1. Diagram 1 Front Panel and Serial Port Initialization Tore ene al P ne Serial Port Init vi 5 tart ene T Atib manun a E gt i Serial Port Init Simple Error Handler vi 5 Initialize COM Port eae eee COM COM Reference This i how you change the color s of Ee nl _ the Read Timeout light 11776947 The input array is pairs of 32 bit integers l Cluster 13 Foreground color Build Arra Background color ma a aa aaa a aa S Saeed START button FALSE No action is required A delay of 250 milliseconds is required pgpoogogo0og0ogopogogo0oog0go0oog0 g START button TRUE Frame 0 of the sequence Initialize the Read String front panel indicator to the Null String Frame 1 of the sequence Initialize the Serial port passed from the Calling VI Honeywell The default PPT communication conditions of 9600 baud 8 data bits no parity and one stop bit A Boolean value indication of whether or not there was a port initialization error is passed to the Case structure within the adjacent While Loop Front Panel Setup The On Off colors of the front panel error lights are changed from the default colors to red gray No color change is required for functionality This VI uses two different methods to accomplish this The Serial Error indicator default colors are modified by passing an array of the necessary 32 bit integers to the attribute node See LabVIE
2. a oo a og 235 ao om Oy 3S a8 Zo 3 a UOHeSIpUy amssarg Honeywell reserves the right to make changes to any products or technology herein to improve reliability function or design Honeywell does not assume any liability arising out of the application or use of any product or circuit described herein neither does it convey any license under its patent rights nor the rights of others Honeywell 900259 6 00 7
3. 3 ERROR Caption Honeywell Initialize the shift register to the Empty String Serial Init Error the True case displays ERROR in the Read window and the error condition is passed to the next Case structure No Serial Init Error the command to request a single pressure reading is built and written to the Serial port Error status of the Write function passes to the adjacent Case structure Write Error No Read take place set the Read string to Null and pass an error to the next Case structure No Write Error Read one character at a time Concatenate to the Shift Register contents and repeat the process until the returned character is a Carriage Return or the Read operation times out When a Carriage Return is received pass the Shift Register contents and error status to the next Case statement Diagram 3 Extract numeric data Chart data add to data array write data to file a OSE tory d False p Pressure Indication dl False P READ did not timeout Parse the returned string and 4 clear the echoed command ou may want to send some atypical data point other than O to indicate no response from the PPT No Acton Required READ timeout error Ws Ws Ws Ws We ee es a E aa al lM al lll al ll ll ill al ill lll ke a 0 No Read Timeout Extract the numeric portion of the PPT response Send this value to the Chart as well as adding to the data array The co
4. Honeywell Using LabVIEW with Honeywell s Precision Pressure Transducer PPT AN 105 Preliminary This application note describes National Instrument LabVIEW LabVIEW is copyrighted software from National Instruments Austin TX Virtual Instrument routines for interfacing to Honeywell s serial output Precision Pressure Transducers the PPT and PPT R Data Sheets for these products are available on the Honeywell SSEC website at www ssec honeywell com A LabVIEW Virtual Instrument consists of a user interface called the front panel consisting of a mix of controls and indicators The graphics based program code is contained in the associated block diagram These Virtual Instruments VIs were written by Honeywell specifically for the PPT family and are downloadable from our website at www ssec honeywell com Only a very basic familiarity with running LabVIEW is necessary to use the VIs as is The second section of the note describes in detail how a VI for charting and data taking was constructed The user can build upon this example to create a PPT interface VI with customized capabilities This section also provides some general comments on interfacing to a multi unit PPT network using a VI Background The PPT and PPT R provide pressure readings in digital format ASCII text along with a conventional analog output Users can send commands to the PPT and receive data from it through the digital interface using a PC and terminal emulator
5. W help for the specifics on determining the appropriate numeric values The Read Timeout indicator default colors are modified by building an array of clusters made from color box constants and passing the resultant array to the applicable attribute node Note the electronic version of this note is in full color Diagram 2 Write request for a single pressure reading Read and parse the PPT reply E D Ei no error AND 2 gt as a gt sesten not a CR a ri H 5 a Se oe gt oe he eensesesees ar N Di 2 3s x Fs 5 a oe x Ts so S Ss Px Se S ok 3s Se N Ie a By Simple Error Handler vi amp Serial Port Write Error False Read With Timeout Executed BN een Ren T Pen Bee Ree Ben Pen T T Fen Bee Mes 1 er er en em T T Bn Bn Bn Yen T Pon Bin Ben Ben T T Pee Pee im ee in i TTS T Bon Be Bn T Yon Yen E T T Bor Per Po ee ee Bes en Bn Ben Bn Nn T Ben Ben Bn Pon TT Pon en Ben on rn Be em Bs Ben en Bn Pon Pn ton on nen T T en em en re re Se ae ee eee eR ne ie nities MMS STN NM NN SN RB AN AT BN MN MT NM MM NNR MM NN NAMM MMM MN MMM NNN NN NN TMT MT MT MM MN NM NN ST MN MN MT MM TN MMM NN RR NN RN AMT MT MR MAT a aa hak e e a a aoa al al ah a ak Baa a a a a Sa Saa a Sa Sa a Sa Sa S a a a a ak Sa S aad a a a a E SO aa a at a oak a a E al a a kat a ad eee Error False Serial 3 Read String with Timeout Port Write Executed Sample Delay ms 126 fi Error True No Read With Timeout
6. and performs a read with time out The Read with Timeout VI will wait until the reply is available Carriage Return received or the time limit is up whichever comes first Although it is not a full fledged terminal software application it does provide sufficient functionality to demonstrate how to communi cate with a Honeywell PPT using LabVIEW i Single Write Read v1 u fi 3pt Application Font E Sub VI lt Configure vi gt Identify Serial Number pressure units change pressure units of PPT p gt Configure Yi M erorien n fo Ip ES Honeywell Sub VI lt PPT Chart 2 vi gt Real time plot of PPT data and enables the user to save the data in a Tab delimited text file gt PPT Chart 2 vi File Edit Operate Project Windows Help 86 401 5 401 PSI Sample Delay ms Serial Erro sog 222 4000 Start Read String i 701CP 66 401 10004 iie Read Timeo CI 6000 _ u ny Common Problems During Serial Communication Most problems are in the software not the hardware Use the example VIs as a reference point for ways to send a command to the PPT parse the returning ASCII text and implementation of at least rudimentary error handling Program hangs up A common problem is reading serial data and expecting a certain number of characters in the response If there are not the specified number of characters at the serial port the program waits there indefinitely hung up The examples pr
7. mmand written to the PPT will be echoed after the reading so perform another Read operation to clear out the buffer See how many characters are in the buffer and Read that number of characters Wi se ee ee ee m Read Timeout Error True Send some atypical data point to the Chart and data array li The While loop checks the status of the Start switch If it is still True no additional action is required If the Start switch has been turned Off the data array is transposed and written to a Tab delimited text file Upon return to the calling VI the serial port will be closed Honeywell Diagram 4 PPT Chart 2 Block Diagram Conclusion With LabView users can create a PPT interface VI with custom capability for both single units and multiple unit PPT networks Users can easily execute interface to the PPT for establishing communication issuing commands configuring the device charting data real time and storing to text files ad WEIS og Ea 0 Contact Information Customer Service 800 323 8295 www ssec honeywell com 7st 18384 1009 punoibyse g 10 02 puno153104 anjg uaaig pay ae saj q 2214 13M0 siabaqui yig zg jo sned si fene yndui ay j moron 4 0 pee paynsaxy IMA og Jeuas casyey 1017 A JajpueH 1033 ajdwig Aa YOg puas noawrj yum Guns peay E peay casjey 1013 noawi j yim Peay jeuas payna xg jnoou YA E m gt a a gt S e 5 oo oS alk Fz gt
8. ort initialization e a serial port WRITE to request a single pressure reading e a serial port READ to capture the reply e Parsing the reply to separate the response from the echoed command extracting the numeric portion of the reply for charting and adding to an array and finally writing the array into a Tab delimited text file for use in a spreadsheet program The block diagram shown below is described in detail by separating it into three areas 1 Front panel and serial port initialization 2 Write and Read operations 3 Extraction charting saving of the numeric portion of the response The complete block diagram is included on the last page for reference Honeywell Networked PPTs The example VIs discussed communicate with a single PPT However each PPT is individually addressable and it is possible to build a network of PPTs if they have been assigned unique IDs A PPT ring network utilizing the RS 232 protocol may contain as many as 89 PPTs A multidrop network is possible with RS 485 PPTs The RS 485 standard allows a maximum of 32 units on a single bus but to accommodate more than this some of the allowed units can be repeaters Each repeater can add an additional 32 units up to the maximum allowable 89 PPTs on a network Implementation of appropriate For Loop Structures dynamic command construction and parsing of the PPTs responses are beyond the scope of this note Request the PPT Users Manual for further information
9. ovided use lt Read with Timeout vi gt returning an error if the read operation does not complete within a couple of seconds Rather than request a fixed number of characters a request for a single character is repeated until the PPT end of message character a Carriage Return is received A second less common source of timeout error selecting the wrong COM port and trying to communicate with a PPT through the wrong COM port Termination Character Serial communication can be challenging to use for device control The key is making sure the command syntax is exact no extra characters or spaces and terminated with a Carriage Return as required by the PPT Incomplete Incorrect Data Transfer A common problem occurs when a read operation on the serial port does not return the string of characters expected This may happen because a Read operation happens before the Write operation completes This can be resolved by using Sequence structure and or data dependency Refer to the sample VIs for examples of these techniques 2 Constructing a LabVIEW Virtual Instrument for the PPT In this section the construction of a VI for communication and charting data is described so the user can understand the techniques involved and create modifications if desired A basic familiarity with the LabVIEW methodology for building Virtual Instruments is assumed lt PPT Chart 2 vi gt incorporates all the basic functionality for communication with a PPT e Serial p
10. software such as Hyperterminal Hyperterminal is copyrighted software from Hilgraeve Monroe Michigan Factory default settings establish all key parameters such as update rate allowing quick utilization of the PPT once communication through the serial port is established When the user is familiar with the PPT performance and command syntax changes from the factory settings can be made to tailor the output to the specific measurement requirements If the new settings are stored they will be the new defaults each time the PPT is powered up Terminal emulator software is inadequate for some data taking needs Yet the words serial port programming may cause a cringe of apprehension for the user seeking an enhanced capability The Virtual Instrument routines described in this note provide LabVIEW users with an easily executed interface to the PPT for establishing communications issuing commands configuring the device charting data real time and storing data to text files Note The LabVIEW VIs discussed here assume a PPT with RS 232 communication or RS 485 communication with an in line converter from RS 485 to RS 232 PPT power and data communication requires a data cable power supply available from Honeywell or the user may fabricate the required cables using the wiring diagram information in the PPT User Manual and appropriate connectors 1 Virtual Instruments Routines for the PPT This section of the note describes the functions of the Vir
11. tual Instruments written for the PPT and discusses common serial port communication problems There are a few general examples of serial port VIs provided with LabVIEW but not much written material on the topic of serial port programming The Honeywell PPT specific VIs are contained in a library file lt PPT Demo llb gt The top level VI lt PPT Master vi gt provides the user interface to a set of Sub VIs All these VIs are built using only the native capabilities available within LabVIEW software The Master VI and the Sub VIs in this file follow PPT Master VI This Vlis the interface for several Sub VIs used to communicate with PPTs The selected Run This Sub VI menu item will execute when the RUN button is pressed In the example below the COM port will be initialized when the RUN button is pressed gt PPT Master vi File Edit Operate Project Windows Help fi 3pt Application Font x Find COM Ports Requires NI VISA 8 lritialize COM Pott Check Configuration Single Write and Read Real Time Plot COM Port Selection COM 1 Y Sub VI lt Find Ports vi gt Uses NI VISA functionality to find serial ports installed on your PC Sub VI lt Serial Port Init vi gt Initializes Serial port of choice to PPT default communication protocol Sub VI lt Single Write Read vi gt The Serial Communication VI performs bi directional communication with a port It initializes the port writes a string to the port
Download Pdf Manuals
Related Search
AN105 a1050 ana105 am1050 giant a105 material a105n am 1050 ann arbor ana1055 a105n material a1050p am 1050
Related Contents
GUIDA SOFTWARE DELL`UTENTE PDF版をダウンロードする relazione progetto preliminare scuola materna Ericsson LBI-38848D User's Manual NXN-20CSL TERMOCOMBI TC 30 - La Nordica Samsung SGH-D808 User Manual Bodyeffect リヤアッパーサポートバー取扱説明書 Bodyeffect リヤ Serie Cubis de Sartorius USER MANUAL - Electrocomponents Copyright © All rights reserved.
Failed to retrieve file