This page provides a detailed example of how to collect data from Sawyer using PuTTY.
Collect data coming from Sawyer and organize that data in a .csv file using Putty.
A computer, which is network connected to Sawyer and able to receive TCP/IP connections.
A network connection can be physical through an ethernet cable or by Sawyer and the computer on the same network.
The computer must have Putty installed. PuTTY is a free and open-source terminal emulator, serial console and network file transfer application. Can be found at Putty.org.
In Intera Studio
- Open Device Editor in the Toolbar.
- Select the Plus Icon to create a new device and choose TCP/IP.
- Name the device and have Sawyer Receive Connections. Note the Port number: 4000, that is the default and will be referenced in PuTTY.
- Select Set to proceed.
- The objective is to send customized data OUT of Sawyer. Therefore it is unnecessary to define the input Signals.
- Select Edit to Define Output Signals.
- Determine the number of fields to send OUT.
- Determine the number of fields to send OUT.
- Edit and complete Start, End, and Internal Delimiters. While there is no formal definition for the .csv format, the configuration shown below is suggested which adheres to the commonly used RFC 4180 standard.
- Proceed with Customize Signals
- The data that will be sent out will need to be defined.
- Name: Data Name. This is what it will be known as in Intera.
- Type: What kind of Data will be sent out.
- Units: This is very important to get right. Decide the type of value you want to output then use Shared Data to verify the units and select the correct corresponding units. If the wrong units are selected then the program will not be able to output what is desired.
- Default: This is the default value which will be set for the signal during the initializing phase
- Current: Actual value of the signal
- Choose RAW as the connection type. This is very important. Choosing another connection type may result in connection issues.
- Hostname: Use the Robot IP address that can be found in the About Panel on the head screen.
- Port: The default port is 4000 and can be edited in the Device Editor.
- Saved Session: Saved sessions is a good idea to keep successful session readily available for recall on start-up.
- On the left hand menu choose Logging.
- Session Logging; All session output is suggested.
- Log File name: It is suggested to change the name to a .csv name so your computer knows what type of file it is and will open it with the appropriate program (often Microsoft Excel)
- Choose Browse to decide where the file will be stored on the computer
Begin Receiving Data
PuTTY is now all configured. Clicking Open will open the connection and the connection window will appear. This will show all the data coming in but it will also be logged in that file we have named previously.
Now the PuTTY is connected to the Robot. This can be confirmed by;
- Verifying that the indicator is GREEN in the Device Editor
- Using Shared Data to find the Output Data names and edit those values. Those values will appear in the PuTTY Window.
Sending Data in a Task
Data can be sent to Putty while a task is running. To send Data use a Set To at a specific point in a Task. The point where the Set To is placed is the exact place the data will be grabbed from the robot and sent to PuTTY.
For this Example, both Output Signals need to be defined as Integers.
Additionally, an User Defined Variable needs to be set up as follows:
Configure the Set To -1:
- The variable will be the name of the Data going out. This was defined in the Device editor. The Value will be the data desired. In this example, the timestamp should be sent, therefore the Signal_Out should be set to Timestamp (ms).
- The Signal_1_out should be set to Count_userdefined, which is an user defined variable and is counting the loops by incrementing itself, which is defined in the Set To -2
Configure the Set To -2:
- To increment the Count_userdefined variable on each loop, the Set To -2 node will be set up as follows:
Adding a Wait node, that is set up to 1s, will complete this example task.
Each second, the timestamp as well as the user-defined variable Count_userdefined are sent to PuTTY, delimited by a comma, as shown below:
After termination of the task, the log file is saved at the desired and predefined location and can be imported by an appropriate program, e.g. Microsoft Excel.
Note: The Timestamp uses Epoch time. Please look up the definition of the Epoch time and how to convert it.