0% found this document useful (0 votes)
76 views40 pages

Touchwin Instruction Manual

The document introduces advanced programming instructions for an industrial touchscreen programming tool. It begins by explaining how to enable the advanced mode by modifying a configuration file. This allows access to additional screens, windows, and tools in the programming interface. It then provides details on: 1) The various advanced drawing elements that can be used to build interface components 2) Operations like floating properties, including other elements, and linking properties to create relationships between elements 3) Examples of using specific advanced instructions like switches The document aims to help advanced users unlock more powerful programming capabilities in the touchscreen software.

Uploaded by

muaadh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views40 pages

Touchwin Instruction Manual

The document introduces advanced programming instructions for an industrial touchscreen programming tool. It begins by explaining how to enable the advanced mode by modifying a configuration file. This allows access to additional screens, windows, and tools in the programming interface. It then provides details on: 1) The various advanced drawing elements that can be used to build interface components 2) Operations like floating properties, including other elements, and linking properties to create relationships between elements 3) Examples of using specific advanced instructions like switches The document aims to help advanced users unlock more powerful programming capabilities in the touchscreen software.

Uploaded by

muaadh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Advanced Instructions

Preface
Inside Xinje TP series program tool, system’s advanced instructions are included. These advanced
instructions are open for those advanced users! This is equally the second development based on
TP’s current functions. This will make the user more easily to use more functions and more
closely to the application! In the following chapters, we will mainly describe advanced
instructions.

Basic part:

I. Familiar with advanced mode

System’s defaulted program mode is common mode (primary mode)! To use advanced instructions,
you should first open advanced functions!
Open the “TouchWin” installation path, generally it is: C:\Program Files\XINJE\TouchWin, find a
configure file named “option.ini” in this folder, open is, add two sentences at the end of this file,
then save and close!

Start the advanced functions:


[software]
usermode=1
Close the advanced functions:
[software]
usermode=0
See the following chart:
The following, we open the software. We could see the edit environment changed! Let’s
compare TouchWin software including advanced application and common TouchWin software!
Open TouchWin edit tool, new create a project. We could see in the software, “Screen” part there
are already 5 basic screens: screen 1、Common Screen、Password Screen、SetRTU、PickSave、
Print and Alarm. We take these screens as system screens. In the common program mode, we
couldn’t see these screens. In the “Window” part, also 5 basic windows are created: Commu NG
Window、password opened window、password closed window、password NG window、KeyBoard
and open password window. We treat these windows as system windows. Just as system screens,
we can not see them in the common mode. On the base of them, carry on twice development on
the base of the system. This will highly fulfill our actual requirement.

Program interface under the advanced mode:

Advanced applications not only show on this point, but also in the toolbar, there appears advanced
draw toolbox. See the following chart:

Display number:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

1. Switch 26. Read


2. If 27. Write
3. Base text unit 28. Block
4. User input 29. Count
5. 30. Pulse
6. Input data 31. LED
7. Screen jump 32. Print
8. Password 33. Assign
9. Open password 34. Locate input
10. +,-,*,/ 35.
11. Call 36. Record
12. Nop 37. Pick
13. Line 38. Location
14. And,Or,Not 39. Search
15. Compare 40. Trend Map
16. Edge 41. Struct
17. Windows 42. Spell
18. Window position 43. Trigonometric
19. Data 44. Antitrigonometric
20. Convert 45. Pow Function
21. Range 46.
22. Array 47. Beep
23. User input 48. LCD
24. RTC 49. Com Send
25. Special Function 50. For

After knowing these devices, we could find that elements in components toolbox are all composed
by these advanced draw units and preceding draw units. The following, we take one element such
as “Text” to show its content.
Place “Text” on the screen
Click right key, in the pop manual, choose “Advance”
Open each level of “group 0”, we could see that group 0 is constituted by self units and self
property, self property means the basic units to compose this component.

In this example, we could see that “text” component is actually IF0, IF1, IF2 and display unit. If
open other components, we could see nearly all components are composed by advanced units via a
serial operation. Via these basic units, we could get all components we want. But this process is
not the simple compose, the certain operation is necessary.
II、Operations under advanced mode
This including: property floating up, include and connection.
(1) Property floating up
Take a simple example, we need to draw a graph includes a circle and a line, also need the circle
and the line always have the same color. According to the preceding method, first draw a circle
and a line separately, the set color in their property to be the same! However, if we repeatedly
draw this type of graph, apparently this method is too trivial. In the advanced application, these
operations are not needed. Our method is: combine this two graphs together, upgrade the circle’s
color and the line’s color as this integrator’s color. Then we only need to set this integrator’s
property. The detailed steps are the following:

1. Draw a circle and a line in the screen.

2. Choose both circle and line together

3. Click the right key, in the pop-out menu, click “Group”, then the circle and the line become an
integrator.
4. Choose this group, click the right key, in the pop-out menu, choose “Advance”.

5. There will pop-out a advanced window, we could see, group 0 includes an ellipse/circle and a
line.
6. Further open Ellipse/Circle0 and Line0, we could see in Ellipse/Circle property there is “Frame
Color”, In Line0, there is “Color”, these items are what we want as the same property.

7. Click “Frame Color” to make it display in the opposite colorÆClick “Property Float” in the
rightÆClick Group [0] (means the property float to group 1)Æclick “Affirm Float” in the right.
Now you could see in Group 0, there are one extra “Float Property”.
8. Open “Float Property” lower level menu, in which “Ellipse/Circle_(1) of Frame Color”. Click
this item, its correspond Ellipse/Circuit 0 self property display with the different color. Also this
name could be modified. Refer “Modify Name” in the left!

9. Click “Modify Name” button in the right, then there will come out an edit frame. In the
“Content” item, you could modify the name.

10. The following thing is to make the line’s property float, then combine with the
“Ellipse/Circle_(1) of Frame Color”. The operation is the following:
Folder Line0’s self propertyÆchoose “Color”ÆClick “Property Float”Æthen click
“Ellipse/Circle_(1) of Frame Color” in “Float Property”, then click “Affirm Float” in the right.

From the graph, we could see that “Ellipse/Circle0 of frame color” correspond both circle’s frame
color and line’s frame color (When click “Ellipse/Circle0 of frame color” in the “Float Property”,
circle’s frame color and line’s color appear other color), this means frame and line’s color have
been upgraded to be the group’s frame color.
(2) Including:
A single display unit, its display content can only be the pre-set information. They couldn’t
dynamic change according to our requirement. We could use advanced instructions to define. Let’s
refer to the following examples:

1、Click in the advanced draw tool, place it in the screen.

2、Add a “Read” unit in the screen, too. Since we want to display the read information via

this screen.
3、Choose both these two units at the same time, click the right key, choose “Advance” in the
pop-out menu, open “advance screen”.

4、To make the display unit display the read information, then display unit should include
“READ0”. Open TEXT0’s property, click “Display Content”, then click “Property Contain” in the
right, then click the unit you want to include. Here, we click READ0 (pay attention to the button’s
change). Then click “Affirm Contain”.
5、At last, click “OK” to realize contain operation.
Now let’s see the screen’s change, refer to the following graph, that is, the current read data is
AAAAAAAAA.

(3). Link
See the following graph, in the screen there is a circle and a rectangle, if we want the rectangle’s
color changing with the circle’s color, then relationship is necessary. Relationship mainly means
the relation of property. Here our operation is to connect the rectangle’s color property and circle’s
color property. The detailed operation is:
1. Add a circle and a rectangle, then combine the circle and the rectangle together.
2. Click the “Advance”, then open it one by one
3. Float the circle’s color and rectangle’s frame color. First choose the ellipse/circle’s color, clock
“Property Float” key in the right, then click “Group 0”, then “Affirm Float”. By then
ellipse/circle’s color realize float. Next, set the rectangle frame color to float, the operation is the
same with ellipse/circle.

4. Set the relationship between the two items in “Float Property”. Click the item you want to
connect (Ellipse/circle 0 of float color)Æclick “Property Link” in the rightÆclick the item to
connect (Rectangle 0 of float color)Æclick “Affirm Link” in the right.
5. Click “OK” key to finish.

By now we introduced property float, include, Link and their relative operation. In the actual
operation, we could note to use property float and link, combine operation is necessary, while
“Include” don’t need combine operation. At the same time, please note that you couldn’t see the
effect of some operations, but if you download to the touch screen, you could see the effect.

III、Using advanced units


The following, we will describe advanced units in details.

(1) Switch

It equals switch (case) sentence in out program language


Add this unit in the screen
Click the right key to open its property

In the “Switch” option, it includes “Index”, number 0 means the current No.0 unit is been chosen.
Here “unit” means the element which has been added into “Switch”. For example, we could add a
line, an arc or a circle. The detailed method is: Draw a screen on the other place of the screen, then
drag it into “Switch” unit, a dialog box will pop out. Click “Yes” to confirm the operation!
Refer to the following chart:

Now add an arc, a circle with the same method. Now click your right key and choose “Advance”,
we could see in “Switch” unit, there are three elements. Also you change their order via “Move
Up”, “Move Down” button in the right!

Here in the “Switch” property dialog box, if you choose 0, it means the chosen element in the
screen is the arc. If choose 1, it means the chosen element is the line, if choose 2, it means the
chosen element is the ellipse/circle. About “Position”, it’s similar with the primary using method.

2. If unit
“IF” unit actually is a specialty of “Switch” unit, “Switch” could contain many branches, while
“IF” unit could only contain two switches.

3. Basic Test Unit (For display)


Basic Test Unit is used to display text or data, it’s a very important unit in the touch screen
software.
Click your right key to open the property dialog box.

4. User input
Place in your screen, open it’s property dialog box with your mouse.

User Input usually use with button unit, set the value of which data the user input via setting of
“Input ASCII”

5. Input Data
Place a “Input Data” unit in the screen, open its property dialog box.
For the other icons, you could check yourself!
Foreword:
The whole system’s advanced instructions are described for two parts. In the
preceding chapter, we introduced the basic part, not refer to the application. The
purpose is to make the user have an initial understanding. In this chapter, we mainly
introduce how to use them. Also we give some examples for your reference.

Application Part
I:Case solution
E.g.1.Input two data, compare them, output the larger one (Take TP560-L as the example)
Units that should be used:
One “Text” unit、four “Read” units、one “Compare” unit、one “IF” unit、two “Data
Input” units、one “Data Display” unit.
1、Create a new project. First place two “Read” units and a “Compare” unit in the screen.

2、Modify the property of first “Read”, see the following chart. Here the modify type is register,
object is PSW200. Modify the second “Read”, make it point PSW301.

3、Double click “Compare” element, open it’s property, default the compare type as “(>)). It

1
means the left operand is larger than the second operand or not.

4、Choose the three unit together, click the right key and choose “Advance”.

5、Open the advanced property, open compare unit’s self property (Left operand and right operand
appear). Choose left operand.

2
6、Click “Property contain” in the right, then choose READ0_[1], pay attention to the changing of
buttons in the right.

7、Click “Affirm Contain”, which means compare unit’s left operand corresponds with the first
“READ” unit’s register. Do the same operation with the right operand, make it point to the
second “READ” unit’s correspond register. Click OK to finish the new screen:

3
8、In the screen, add “IF” unit.

9、Choose IF and “Compare” units together, open the advance property, see the following chart.
There is a “Current Value” item in IF unit IF0_(3), this item is the judge condition of IF0_(3).
When true (value is 0), false (value is 1).

4
10、Choose “Current Value”, click “Property Contain” in the right. Choose the compare unit, click
“Affirm Contain”, see the following chart. (here in IF unit IF0_(3) there is an extra “Contain
Unit”), after finish, click “OK”.

11、In the screen, add two “Write” and two “Read” units.

5
12、Modify two “Write” units’ property, the type is register, object is PSW302, see the following
chart.

13、Modify the two “READ” units’ property, point separately to PSW300 and PSW301

14、Choose the preceding “READ” and “Write” units, open the advance property.

6
15 、 Choose “Write” unit WRITE0_(0): “Input Value”Æclick “Property Contain”Æchoose
READ0_0Æ click “Affirm Contain”—OK. The action is to write value in PSW300 to PSW302
Do the same operation with the left READ unit and Write unit, the action is write the value in
PSW301 to PSW302

7
16、Drag the two “Write” units into IF unit, in the pop out dialog box, click “OK”.

17、Now we finish the interior process of compare operation. Now let’s make the alternate
interface. Add a “Text” unit in the screen, two “Digital Input” units, one “Digital Display” unit.
Modify the text display content as “Please enter two values: (The larger is been put out)、modify
two “Digital Display” units, make their object separately point to PSW300 and PSW301、modify
“Digital Display” unit’s object to point PSW302. See the following chart:

8
18、Now please download to the touch screen, run in the touch screen. Input two values, compare
them, the larger one will be output.

9
E.g.2.Clock simulate. (Take TP560-L as the example)
Note:As the example, we here only simulate the running condition of time—Second. If you have
the interests, you could expand the stopwatch’s function, clock function etc.
Units to use:
One “Text”, one pulse unit, three read unit, one arithmetic unit, one compare unit, two
IF units, one digital display unit.
1、Create a new project. First place a pulse unit and a read unit in the screen, see the following
chart:

2、Open “Pulse” property, modify the permit sign as “Permit”, the period is 1, see the following
chart:

3、Double click to open “Read” unit’s property, modify the type as “Bit”, the object bit is PSB4.

10
4、Choose two units, open the advanced property, see the following chart:

6、Choose pulse unit--Pulse0_(0) “Source Signal” itemÆ click “Property Contain”Æchoose


READ unitÆclick “Affirm Contain”ÆOK. See the following charts:

11
7、Add a “Arithmetic” unit, a “Read” unit, a “Write” unit in the screen. Modify arithmetic
operation as “+”, the right operand as 1, modify “read” property to make the object point
PSW300, modify “write” property to make the object point PSW300.

12
8、Choose these three units, open the advance property. Make arithmetic operation unit’s left
operand contain “read” unit.

9、Choose “Input Value”, make it contain arithmetic operation unit.

See the following five graphs for the preceding two steps

13
10、Add a “IF” unit, a “READ” unit, a “Write” unit, a compare unit. See the following chart:

14
11、Modify “READ” unit’s property, its object is PSW300, modify “Write” unit’s property, its
object is PSW300, Set data as 0. Modify compare unit’s right operand as 59. Choose the four units,
open its advanced property.

12、Open compare unit’s self propertyÆleft operand contain read unit; open IF unit’s self
propertyÆ the current value contain compare unit, choose write unitÆclick “Insert unit” in the
rightÆchoose IF unitÆconfirm insert—OK, see the following chart:

15
13、Add another IF unit, choose IF unit、pulse unit and the right write unit, open the advance
property.

14、Open Self property of IF unit->Contain Pulse unit->Choose write unit->Click “Insert


Unit”->choose IF unit->Click “Affirm Insert”->OK.
See the following chart:

16
15、Finish the interior operation, let’s make the alternate interface. Add a “Text” and a “Digital
display” unit in the screen, modify the display unit’s content as “Second”, digital display’s object

17
is PSW300.

16、Finish now. Download to the touch screen to simulate the running of second.

18
E.g.3.Self-define light effect(Take TP560-L as the example)
Note:The system offer a suit of indicate lamp template, but user sometimes wish he could define a
light effect, then the template offered by the system couldn’t fulfill the user’s requirement. So
combine with the advanced instructions, we could get easily the effect we want.
Units we need:
A rectangle、an indicate lamp button、a IF unit、a compare unit、two read units、two write
units.
1、 Create a new project. First add a lamp button, a frame and a “read” unit in the screen.

2、Modify lamp button’s property:in the object, modify the object as PSB300, in the “General”,
modify the button’s operation as “Inverse”, default the left. Modify “Read” unit’s property,
make its object as PSW300, click OK.
3、Choose Read unit and Fame unit, open the advanced property, see the following chart:

4 、 Open Frame unit’s propertyÆchoose “Back Color”Æclick “Property Contain”Æchoose


“READ”ÆAffirm Contain—OK. See the following chart:

19
5、Add a IF unit、a compare unit、a read unit

6、Modify READ unit’s property: Object is PSB300;compare unit’s property:compare type is”
==”, the right operand is 1. Choose the three units, open the advanced property:

20
7、Open self property of compare unit==0_(2)->choose the left operand->click “Property
Contain”->Choose READ unit->Click “Affirm Contain” in the right->OK
Open self property of IF unit IF0_(0)->choose the current value->Click “Property Contain”-
>Choose compare unit->Click “Affirm Contain”->OK.
See the following chart:

8、Add a write unit, modify its type as register, the object as PSW300、Set data as 1. Copy one, set
its data as 0

9、Drag the two write units into IF unit, finish interior operation process

21
10、Download to the touch screen, run it. Click the lamp button, see Frame’s change.

22

You might also like