Posts Tagged “inport”

As we saw some time ago, new Java classes have been included in the new SDK versions from the TC65 module’s new firmware release (current version 3.0), XT65 (current version 2.0) and TC65i (current version 1.0).

Months ago we saw the new Watchdog class. Today I am going to post a small example of how to use the new InPort and OutPort classes which enable us to easily manage the digital inputs and output pins in our Siemens/Cinterion modems.

Programación java Siemens


GPIO_API_EXAMPLE 
(Download)

Description: I have based the example on the MTX65v3. As you know this terminal has 4 digital inputs/outputs which are GPIO1, GPIO2, GPIO3 and GPIO4.

In the example I configured GPIO1 and GPIO2 and inputs and GPIO3 and GPIO4 and outputs. I presume that they are directly joined together through cable connections (GPIO1 with GPIO3 pins and GPIO2 with GPIO4). In the example the output statuses are varied (GPIO3 and GPIO4) and the input values (GPIO1 and GPIO2) are shown through the standard output (System.out.println). In the Java example you can see that the code is discussed line by line so I won’t dwell on it much here. If you use the MTX65v3 and run the application, this should be the result:

Valid for modems: TC65 (v3.0), TC65i, XT65 (v2.0) y MTX65v3

I hope you find it useful. See you next time.

P.S. Good luck for tomorrow (the 22nd) for the Christmas Lottery, let’s see if we are lucky enough to win!

Tags: , , , , ,

Comments No Comments »