Product Tour: Define Your Data
It really is all about your data: getting it from the PC browser to the device (or the other way around), and doing it quickly and easily. TCPmaker 's transfer variables act like named shipping containers. Let's see what TCPmaker 's transfer variables can do for you:
TCPmaker 's Transfer Variables
At present, there are three types of transfer variables in TCPmaker , all of which have a name, a short Id, and a value:
Integer Variables transfer data in either direction (to or from the PC), and this data remains in integer form on both sides.
Numeric Variables transfer also data in either direction, but the data is not in the same form on both the PIC and PC side. The value of a Numeric variable is used in integer form in the PIC device (and sent in integer form over the Ethernet as well). However, it is scaled and transformed to floating point form on the PC browser. This lets you display variables in floating point format on the PC, without having to do floating point arithmetic (or even having to load the larger floating point libraries) in your PIC code.
String Variables are often used to display titles and headings on TCPmaker screen controls displayed on the browser. Optionally, a String Variable can contain a standard C-style format string, to display your data in a format that you control. This very powerful capability is done on the PC side: your PIC code does not need to do any formatting of the data with format statements, so your PIC code can stay small and simple.
Integer and Numeric variables are easily set up to send values, from TCPmaker screen controls on the PC browser, to the PIC device. Once a variable and a screen control have been defined in the Visual Page Designer , all you need to do is associate a variable with a control, on the property page that is displayed when the control is selected.
Learn more about: TCPmaker's Transfer Variables >>
Scale Your Data -- With NO Code
The value stored in a numeric variables gets transformed from the integer value that the PIC sees to a floating point value that is used and displayed on the PC web browser. This transformation is defined by 4 scaling properties of the particular numeric variable.
You can use these parameters to scale your data without having to write a single line of code.
Learn more about: Scaling your data with no code >>
Format Your Data -- With NO Code
String variables can contain standard format strings that you can use to control how your data is displayed. Suppose you want to read a pot on your board. Follow these steps:
- Create a numeric transfer variable in TCPmaker , called Pot1 and set its scaling parameters (Link: See how).
- Create a String Variable called Sv1 to display the value of Pot1.
- Set the f property of the string variable to be %5.3f Volts
- Set the argument list property of the string variable to be Pot1.
Then, in the Visual Page Designer , you simply associate the string variable Sv1 with one or more controls in your layout.
After you generate your code, you add some PIC code to read the ADC channel and send the raw ADC result to the PC in variable Pot1. When you run your device and turn the pot all the way up, the PC browser will show the formatted string "3.300 Volts" .
Read more about: Formatting your data with no code >>
Next: TCPmaker's Screen Controls >>
Being able to use beautiful 3-D looking screen controls like buttons, sliders, gauges, and graphs, makes TCPmaker a joy to use.
There is no easier or faster way on the planet than TCPmaker, to make embedded web servers that look great, are highly interactive, and work in a wide variety of PIC microcontrollers. Gets your project up and running fast!
Get Instant Access Now at Our Store :