TCPmaker : Visual Tour    How Variables and Controls Work Together  

What if we want to send an Integer or Numeric Variable from the device to the PC?

The process has some similarities to what we've seen so far: 

  • We still need to create a Variable to hold the data. 
  • We also need a Control in our content layout that can display that value. (For example, an LED indicator can show an On / Off value sent from the device.)
  • We need to associate the Variable with the n property of the Control. 
  • TCPmaker's code generator will declare an integer variable in the micro code that has the same name as the Integer Variable you create in the Visual Page Designer.
  • And we still use the principle of Direct Transfer of Variables, so we will assign to this variable the value we want to send to the PC, and then tell the micro to send this variable.

What's different from what we've been doing so far is that an Event Handler is meant for data that is sent OUT from the PC to the device.  If we are going to send a value IN to the PC, where do we put the micro code to do this, and what exactly does this code have to do? 

 
  

8 of 12
Copyright Notice and Author Information