Home
VersaTenn V AppNote 8 - VTV Simple Comm
Contents
1. Once the settings are complete press the connect button The status label will read port open Connect Disconnect Status Port Closed Address GE Port 1 Figure 4 SimpleComm mm Screen 11 13 46 AM BAUD Rate 19200 BAUD Data Bits 8 Data Bits Par ity None Flow Control None Description The BAUD Rate displays the baud rate at which communications occur on the RS 232 port alk 0 0 Chamber Off Figure 5 VersaTenn V Page 4 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 I EEE 488 To communicate over IEEE 488 you will need an I EEE 488 communications card installed in your PC Plug a 488 cable into the back of your PC and connect the other end to the 488 port on the chamber On the SimpleComm press the IEEE 488 tab and set the port number to the same port number specified on your GPIB controller Figure 6 Next set SimpleComm s 488 address to the same address as the VersaTenn V Figure 7 The default Timeout is set to 1 second 1000 ms The default sample rate for the EEE 488 is 4 times per second SimpleComm will query the chamber 4 times per second until the timeout period is reached IEEE 488 has no connect buttons connections are made on an as needed basis If a communication attempt fails a popup window will notify the user of the error Properties Address 3 Timeout ms 1000 Port jo Figure 6 Si
2. All query commands are preceded with a and all set commands are preceded with an Figures 13 amp 14 Command CAL2 Send Loop Log Response 0 00 Figure 13 Sending Query Commands Command CF 1 smi I Loop Log Response msn Figure 14 Sending Set Commands The RS 485 commands are a special case Normally commands over RS 485 are preceded by a greater than symbol and the address gt 02 CAL2 and all responses are similarly preceded lt 02 0 00 SimpleComm automatically prefixes the commands so it is not necessary for you to Page 8 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Sending and Receiving Command Loops To send an individual command multiple times such as monitoring the temperature C1 select the loop check box Figure 13 The command string will be sent once a second as long as the loop box remains checked The response box will display each reply as it is received To change the sample rate select the File menu and Preferences Select the sample rate you desire and press OK Figure 15 The default sample rate is 1 second Logging Rate Preferences E Ioj x Sample Rate 300 ms x 10 sec C 60 sec OK Cancel Figure 15 Sample Rate TCP IP has an additional logging feature that logs all responses to the looped queries to a file called log txt It is located
3. in the SimpleComm s root directory Neither looping nor logging will function while you are sending or getting settings lists Settings Lists Settings Lists are lists of commands that get a snapshot chamber s current configuration or set a chamber to a preconfigured state If you have multiple chambers and would like them all set to the same state you can configure one chamber and get all its parameter values and save them to a Settings List You can then use this list to send these values up to the other chambers quickly putting them all in the same configuration Settings Lists are simple text files and can be edited in notepad if desired Commented lines must be preceded by a double slash When loaded the comments will be displayed in the Memo field Figure 16 Page 9 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Gs SimpleComm YTY SET MASTER ts Cf x File view About IEEE 488 TCP AP 1 TCPAP 2 Connect Disconnect Status Socket Connected Address 172 16 10 118 Port 5000 Command 1DN SystEn DN I Loop 1000 Send Response Lunaire VersaTenn Y Serial 94 0606 Version 2 0 8 m Command List VTV SET MASTER vts f Edit List Save List Clear Grid Clear Col Line Command Value Response a 2 CAL1 0 00 3 AIL 200 00 4 A2H 104 00 4 gt Command List Comments GetList SendList Stop Send Serial Number Appli
4. Code There are several key selections of code that form the backbone of communication over serial ports TCP IP and GPIB The selections are discussed below and are broken into three areas settings amp connecting sending data and receiving data These sections of code can be cut and pasted into your own programs thus adding quick and simple communication routines to your applications Page 13 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Setting amp Connecting Setting amp Connecting with RS 232 amp RS 485 If your not connected then connect If Not MSComm1 Index PortOpen Then Set the Comm Port number to the value in the Comm Port text box MSComm1 Index CommpPort Val txtPort Index Text Set Baud Rate and Parity MSComm1 Settings 9600 N 8 1 RS 485 MSComm1 Settings 19200 N 8 1 RS 232 Open the port MSComm1 Index PortOpen True MSComm1 Index I nputLen 0 MSComm1 Index RThreshold 1 End If Setting amp Connecting with GPIB Set the timeout to the value in the timeout box milliseconds TMWControll TimeOut Trim Str Val txtTimeout488 Text Set the address to the value in the address box final address will appear as GPIBO 1 INSTR TMWControll address GPIB amp Trim Str Val txtPort Index Text amp amp Trim Str Val txtAddress Index Text amp INSTR Setting amp Connecting with TCP IP If your not co
5. VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 VersaTenn V Simple Communications The VTV SimpleComm application is an all in one communications package designed to be used with VersaTenn V environmental chambers It provides a simple interface for sending and receiving commands over RS 485 RS 232 IEEE 488 and TCP IP The VersaTenn V supports over 130 unique commands allowing for complete control and monitoring of your chamber from remote locations You can find the VersaTenn V command set at Tidal Engineering s website www tidalengineering com Navigate to the VersaTenn V page and look under the general information section for the VTV Communications Commands Acrobat Reader file This file contains a spreadsheet of all the available communication commands The source code is also available on the web site for users who would like to develop their own communications programs The source files are located on the VersaTenn V page and are linked to under the Downloads section G5 SimpleComm YTY SET MASTER ts Cif x File View About IEEE 488 TCP IP 1 TCPAIP 2 Connect Disconnect Status Socket Connected Address 1 72 16 10 118 Port 5000 Command DN SystEn DN I Loop 1000 hms Send Response Lunaire VersaTenn V Serial 04 0606 Version 2 0 8 Command List VTV SET MASTER vts Coad List Save List Clear Grid Clear Col Line Command Value Respo
6. ager and expand the Ports icon The VersaTenn s RS 485 port settings are hard coded to 9600 baud rate no parity 8 data bits and 1 stop bit Next set SimpleComm s RS 485 address to the same address as the VersaTenn V Figure 3 The RS 485 Mode must be set to User Comms if it reads UUT Sensors change the setting Once the settings are complete press the connect button The status label will read port open Connect Disconnect Status Port Closed Address 02 v Port 5 Figure 2 SimpleComm Comm Screen 12 23 40 PM RS 485 Mode User Comms Station Address 2 Number of UUTs 0 Description 1 The RS 485 Mode feature is used to choose the Change I communications mode 0 0 Chamber Off SEE Figure 3 VersaTenn V Page 3 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 RS 232 To communicate over RS 232 plug a serial cable into the back of your PC and connect the other end to the serial port on the chamber On the SimpleComm press the RS 232 tab and set the port number to the same port number specified on your PC Figure 4 To determine the port settings on the PC go to Start Settings System select the hardware tab select Device Manager and expand the Ports icon The VersaTenn s RS 232 port settings are hard coded to 19200 baud rate no parity 8 data bits and 1 stop bit Figure 5 RS 232 does not need address settings
7. cation Version Build v gt Figure 16 Settings Lists Downloading Editing and Uploading Chamber Settings When upgrading a chamber to a new application version you will lose all your chambers configuration settings and PID tunings It is a good idea to save all the configuration settings in a separate text file before upgrading After you upgrade you can then reconfigure your chamber to all the previous settings and PID tunings You may use a simple checklist such as the one available in the User Manual and record all the items manually Alternatively you may use SimpleComm SimpleComm has simplified the task of downloading and uploading chamber settings by assembling a precompiled list of commands to automatically query your chambers settings saving them and uploading them to your new chamber To open a Settings List press the Load List button Select a file and press OK The name of the loaded file is displayed on the title bar The content of the list appears in the Settings List data grid The Settings column holds the commands The Value Page 10 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 column holds the values for the commands The Set Response column holds the chamber s responses from set commands To edit an item in the list press the Edit List button Enter your changes and press Save As or Cancel Clicking in the Comments box and typing additional li
8. descriptive name identifying the chamber Sending Data To send your upgraded chamber the original configuration settings load the Settings List you created in the previous step Once loaded make sure you are connected and press the Send button SimpleComm will set the chamber one command at a time until it has gone through the entire list After each set command is sent to the chamber SimpleComm will wait until it receives an OK response before trying to get the next value As each OK response arrives it is placed in the corresponding cell in the Set Response column When the entire list has been transferred and popup window will state that the transfer is complete Get Settings List Example Set Settings List Example Serial Number 06 0201 Serial Number 06 0201 Version 1 4 10 Version 1 4 10 CF CF O CAL1 CAL1 0 00 A1L A1L 200 Page 11 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Important Note Make sure that you always have the chamber set to the same temperature scale for downloading and uploading operations If you download from a chamber in Centigrade mode then upload to a chamber that is in Fahrenheit you will have numerous incorrect settings Additionally all Communication settings cascade registration keys and web server registration keys will need to be recorded and reentered manually The table below is a list of these settings These set
9. dress box tcpClientl RemoteHost txtAddress Index Text Set the port to 5000 tcpClientl RemotePort 5000 While tcpClient1 State lt gt sckClosed tcpClient1 Close Wend MsgBox TCP IP1 is not connected Please connect and try again End If If tcp ip1 is connected Send the command in the command text box If tcpClient1 State sckConnected Then tcpClientl SendData txtOut Index Text amp vbCr End If Page 15 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Receiving Receiving with Serial Ports MSComm1 is the name of the Microsoft Comm component Private Sub MSComm1_OnComm Index As Integer Select Case MSComm1 Index CommEvent Events Case comEvSend SThreshold of characters in transmit buffer Case comEvEOF An EOF charater was found in the input stream Case comEvReceive Received RThreshold of chars Receive the data and write the result in the response text box txtln Index Text txtIn Index amp MSComm1 Index Input End Select End Sub Receiving with GPBIB The GPIB contro has no receive event it must be queried for a response timerGPIB counts down from 2 to 0 decrementing in the Timer1 function Timer1 fires every 250 milliseconds This allows us to check for a response 4 times a second timerGPIB 2 GPI BResult tracks GPIB reply see Timer1 function While loop will exit after receives a reply or times out see Timer1 functi
10. mpleComm Comm Screen 1 06 03 PM fEEE 488 IEEE 488 Address Description The IEEE 488 Address displays the address of Change the IEEE 4888 communications port Chamber Off S1C 0 0 Figure 7 VersaTenn V To view IEEE specific controls press the properties button Figure 6 From this window you may view and set the GPIB port and address Figure 8 You can test the IEEE connection by pressing the test button This test sends the IDN Command to the VersaTenn V The response will be displayed in the response test box Figure 9 If there is no response it will display an error message Page 5 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 T amp MW Instrument I O Control Properties 140 Port Address GPIB a GPIB0 3 Initial Address Set I O I Address Timeout msec GPIB0 3 000 Output Command 10N Output Enter Enter Response Output Enter p Instrument Error Cancel Apply Help Figure 9 TMW GPIB Control Page 6 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 TCP IP To communicate over TCP IP plug a network cable into the back of your PC and connect the other end to your LAN You must also connect your chamber to a LAN The VersaTenn V requires a DHCP router to dynamically assign it an IP address Once assigned the IP Address will a
11. nes will add text to the Comments field You can clear the entire list including commands by pressing the Clear List button Alternatively you can clear selected columns by highlighting the column and pressing the Clear Col button Getting Data To get the current configuration of a chamber load a Settings List that is a list of commands SimpleComm automatically installs a master list of the most important commands The list is named VTV GET MASTER VTS and it is stored in the root installation directory of the SimpleComm program Once loaded make sure you are connected and press the Get List button SimpleComm will query the chamber one command at a time until it has gone through the entire list After each query is sent to the chamber SimpleComm will wait until it receives a response before trying to get the next value As each response arrives it is placed in the corresponding cell in the Value column When the entire list has been transferred a popup window will state that the transfer is complete After you have gathered your chambers settings press the Save List button to save the list SimpleComm automatically installs a master list of the most important commands and their respective settings for a new chamber The list is named VTV SET MASTER VTS and it is stored in the root installation directory of the SimpleComm program We suggest saving your new chamber settings either over this file or in a new file with an appropriate
12. nnected then connect If tcpClient1 State lt gt sckConnected Then IP address HAH HAR HAH HE Set the address to the value in the address box tcpClientl RemoteHost txtAddress Index Text Set the port to the value in the port box tcpClientl RemotePort txtPort Index Text Close it first just in case While tcpClientl State lt gt sckClosed tcpClient1 Close Wend Connect tcpClientl Connect End If Page 14 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Sending Sending with Serial Ports If your not connected tell the user If Not MSComm1 Index PortOpen Then MsgBox The RS 485 port is not connected Please connect and try again End If Clear buffer a MSComm1 Index Input txtln Index Text Send the command in the command text box MSComm1 Index Output txtOut Index Text amp vbCr The 485 send requires a gt and the address such as 02 in the string Use MSComm1 Index Output gt amp cboAddress485 Text amp amp txtOut Text amp vbCr Sending with GBIB Create a global variable to hold a timer counter Global GPI BResult as Integer Send the command in the command text box TMWControl1 Output txtOut Index Text amp vbCr Sending with TCP IP If tcp ip1 is not connected close it and tell the user If tcpClientl State lt gt sckConnected Then IP address HHR ARR HAR HAR Set the address to the value in the ad
13. nse a 1 CF D 2 CALI 0 00 3 JAIL 200 00 4 A42H 104 00 v oft Command List Comments GetList SendList Stop Send Serial Number Application Version Build v gt Figure 1 VTV SimpleComm Page 1 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Installing SimpleComm Insert the setup disk in the floppy drive of your PC Through your windows explorer find the A drive and double click on the setup exe file Alternatively you may press Start Run from your desktop Type A setup and hit enter Follow the directions on the screen You may be prompted to insert a second or third installation disk Connecting SimpleComm The PC on which SimpleComm is running must be connected to the chamber The method of connection depends on the desired mode of communications RS 485 and 232 use serial cables IEEE 488 uses a 488 cable and TCP IP used network cables such as CAT5 Page 2 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 RS 485 To communicate over RS 485 plug a serial cable into the back of your PC and connect the other end to the serial port on the chamber On the SimpleComm press the RS 485 tab and set the port number to the same port number specified on your PC Figure 2 To determine the port settings on the PC go to Start Settings System select the hardware tab select Device Man
14. on While timerGPIB gt 0 DoEvents Wend If we don t receive a reply in 1 second time out If GPIBResult Then no reply txtln Index Text Timeout amp TMWControll TimeOut 1000 amp seconds Else Write the reply to the response text box txtln Index Text GPIBResult GPIB value End If Timer1 function fires every 250 ms Timerl queries 4 times per second and jumps out of while loop once every 1 second If timerGPIB gt 0 Then Check for a response to the previous Send query TMWControll Enter result If we receive a result we break the previous Do Events loop If result lt gt Then Set global variable to response value GPIBResult result timerGPIB 0 Breaks out of previous While loop and records response Else Increment timerGPIB timerGPIB timerGPIB 1 End If End If Page 16 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Receiving with TCP IP tcpClient1 is the name of the Microsoft TCP Client component Private Sub tcpClient1_DataArrival ByVal bytesTotal As Long Dim strData As String Get data tcpClientl GetData strData Write the response in the response test box txtln 3 Text Replace strData vbCrLf 1 1 vbBinaryCompare End Sub Page 17 of 17
15. ppear in the Ethernet folder of the VersaTenn V Figure 11 Set the SimpleComm to the same address Figure 10 The default port for the chamber is 5000 always set SimpleComm s port to 5000 To enable the TCP IP communications on the chamber go to the TCP IP Server folder and set it to enabled Figure 12 Once the settings are complete press the connect button The status label will read socket connected Connect Disconnect Status Socket Closed Address fi 72 16 10 48 Port 5000 Figure 10 SimpleComm Comm Screen flethernet IP Address Selection DHCP Ethernet Address 198 16 10 10 Ethernet Subnet Mask 255 255 255 0 Ethernet Gateway 198 16 10 254 Description The IP Address Selection is used to choose the protocol for assigning an IP address to the chamber Chamber Off EE 00 Figure 11 VersaTenn V Page 7 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Comm Screen 11 17 29 AM frcr Server TCP IP Server On Off Enabled Description The TCP IP Server is used to enable Ethernet communication with the chamber Chamber Off SiE 00 Figure 12 VersaTenn V Sending and Receiving Commands To send individual commands first connect to the chamber then type the command into the command text box then either hit enter or press the send button The reply from the chamber will be displayed in the response text box
16. tings are not part of the sensitive tunings of you chamber and are not absolutely necessary to save Registration Keys Web Server Registration Key Cascade Registration Key Communications RS 485 RS 485 Mode Station Address Number of UUTs EEE 488 I EEE 488 Address Ethernet IP Address Selection Ethernet Address Ethernet Subnet Mask Ethernet Gateway Web Server Web Server On Off Web Server Login Name Web Server Password Web Server Address TCP IP Server TCP IP Server On Off Page 12 of 17 VersaTenn V Application Note 8 31 May 2006 Revision 4 Tidal Engineering Corporation 2006 Visual Basic Source Code Tidal Engineering provides the source code for the VT V SimpleComm as a reference guide for developers We recommend that you use Visual Basic 6 0 or higher and Windows 2000 or higher If you are using Windows 95 98 ME or NT we recommend you do not overwrite any system files if asked during installation Before you install the source code you must install the VTV SimpleComm application which contains a TMW GPIB component that is needed to run the program in Visual Studio To install the source code download the files from the Tidal Engineering web site Double click on the Setup exe file and follow the installation directions Start Visual Studio and open the Visual Basic Project file SimpleComm vbp The source code and forms are fully editable Communications Source
Download Pdf Manuals
Related Search
Related Contents
User Manual Vivanco 8in1 universal remote control 4 – Vous arrivez dans l`espace d`inscriptions BoConcept Model 6150 Assembly Instruction Introducing hierarchy, abstraction, namespaces and relays 全文 - 北海道立消費生活センター Harbor Freight Tools 93520 User's Manual IGT G1-5 User manual Copyright © All rights reserved.
Failed to retrieve file