Make sure to save the file with CRLF as line endings.
... edit the configuration with Excel (or other spreadsheet app)
Most spreadsheet apps use the file extension to decide how to load a file. Therefore, teeken.ini should be renamed to teeken.csv or teeken.ini.csv.
When you Save as... with Open Office or LibreOffice, adjust the settings as follows:
Charset: 'ISO-8859-1'
Field delimiter: ';'
Text delimiter: '"'
Use double quotes for quotes within text: "text ""quoted"" text"
... connect to a Siemens 300 / 400 PLC via Ethernet
source;"MyPLC"
adr;simatic;tcp:192.168.0.7
Defines a source called "MyPLC" that
is of type ´simatic`, i.e. a Siemens PLC
connected via TCP/IP, i.e. Ethernet
at the address 192.168.0.7
Notes:
All node's following a source line will be coupled to that source
The syntax of a node's address depends on the type of PLC
... connect to a Siemens 300 / 400 PLC via USB-MPI cable
source;"MyPLC"
adr;simatic;usb
Defines a source calles "MyPLC" of type simatic, i.e. a Siemens PLC, connected via USB. All following node's will be coupled to this connection.
The USB-MPI connections needs the Siemens "PC/PG-connection" which is part of the Step7 programming software. Therefore, Step7 must be installed. A valid Step7 license is technically not necessary, but might be legally required.
... monitor inputs, data blocks, etc. of a Siemens PLC
Define a source and connect it to a Siemens PLC
Define a ´node´ for each data point below the source
node;a;i0.1;"Button 1";/mybuttons;N
Defines a data point ("node") coupled to this PLC that
monitors input line 0.1 ("i0.1")
will be triggered when it becomes non-zero ("N")
produces the message text "Button 1"
notifies all receivers in directory "/mybuttons"
Refer to Siemens' documentation for the format of valid addresses.
Teeken supports the following Siemens addresses:
I, IB, IW, ID: Input bits, bytes, words, dwords
O, OB, OW, OD: Output...
F, FB, FW, FD: Flags...
DBx.DBX, DBx.DBB, DBx.DBW, DBx.DBD: Data block bits, bytes, words, dwords
T: Timers
C: Counters
Teeken also supports the German address format:
E for Inputs (Eingang)
A for Outputs (Ausgang)
M for Flags (Merker)
Z for Counters (Zähler)
... monitor data points of a Modbus device
Define a source of type Modbus and connect it to the device. E.g.
This will produce an event message, whenever data point 1:1 becomes non-zero, rsp. when the value of data holding register 4:10 exceeds 200.
Teeken supports the following Modbus address ranges:
Range
FC
Contents
0:0 .. 0:65535
1
Output lines
1:0 .. 1:65535
2
Input lines
3:0 .. 3:65535
4
Input Registers (16bit)
4:0 .. 4:65535
3
Data holding registers (16bit)
While data points 0:0..2:65535 can hold only single bits (0,1), inout registers (3:0..) and data holding registers (4:..) are always fetched as 16bit values. You can not monitor single bits in 16bit registers.
Modbus addresses in Teeken always start at 0. If your Modbus device uses addresses from 1, like e.g. Schneider PLC's, you probably have to subtract 1 from every address.
Addresses can be written with : as separator or fully decimal, i.e. 400000..465535 for 4:0..4:65535. Input lines start at 100000. Every number below that will be regarded as Output line address (0:0..0:65535) or error when >65535.
Every data point holds a trigger condition, determining when to send a message, signal an event or write to a file.
The trigger condition can be one of the following:
Keyword
Example
Meaning
N (non-zero)
N
Value becomes non-zero. This is the default condition.
Z (zero)
Z
Value becomes zero
D:x (difference)
D:0
The difference between last and current value is greater than x
O:x (over)
O:15
The current value is greater than x
U:x (under)
U:5
The current value is less than x
T:h:m
T:1:15
Timer, see below
Some examples:
Examples
will be triggered, when...
node;a;e0.1;"Ping!";/signal;N
e0.1 becomes non-zero. This works for Bits like input lines or flags as well as for registers.
node;a;mw17;"Temp overflow";/signal;O:25
the current value of mw17 is greater then 25, whatever this means.
node;a;mw17;"Jump!";/signal;D:0
the current value of mw17 has changed (diff>0) since the last read.
node;a;c200;"Counter A {{*}}";/status;T:*:*
every minute. See the next section for more details about timed events
... trigger a scheduled / timed event or message
Data points (nodes's) can be triggered by time conditions. The trigger keyword for this is "T", followed by the timing scheme for hours and minutes. The syntax for timer triggers follows the crontab scheme.
Teeken supports the following elements, which can be used independently for hours and minutes:
Element
Example
Meaning, i.e. triggered at...
single number
11
exactly the number, e.g. T:11:0 at 11:00
list of numbers
2,5,8
exactly the numbers, e.g. T:2,5,8:0 at 2:00, 5:00 and 8:00
intervals
0/2
every n intervals, e.g. T:0/2:0 at 00:00, 2:00, 4:00, etc.
"all"
*
every element, e.g. T:*:05 at 0:05, 1:05, 2:05, etc.
Notes:
The hours are given in 24h mode, i.e. 13 = 1pm, 18 = 6pm, etc.
The smallest time unit is one minute. T:*:* will be triggered every minute, which might be useful for log files (receiver type file).
Timed events are only triggered when occurring during runtime. Teeken will not catch up missed events.
You can send/log a heart beat signal using the special "!OFFLINE" address like this: node;a;!OFFLINE;heart beat;none;T:*:*. Teeken will send a new message every minute, even when the Source is not connected.
... detect that the PLC / machine is defect
Teeken support some pseudo-addresses for nodes to detect and report special situations. All pseudo-addresses begin with a "!" and are therefore called "bang-addresses".
node;a;"!OFFLINE";"This device is offline";"/machine";N
This node will be triggered (non-zero), whenever Teeken cannot communicate with the device. Use it like any other node to send or log a message.
... send messages by e-mail
If you set up Teeken to send messages by e-mail, it will send one e-mail per node that was triggered. To be able to do so, you'll have to set up the mail transport server and at least one receiver of type mail.
The Subject: line contains first the source name of the node, followed by the text part
The mail body contains
"M:" - the message (text)
"T:" - Date and time when the node was triggered
"S:" - the source name
"A:" - the address of the node
"V:" - the current value of the node
Notes:
The SMTP account credentials are stored in Teeken.ini as plain text, vivisble for everyone who has access to the file
You can define only one SMTP-Server and only one From-address
You can define many receivers with different To-addresses
Many mail servers will regard too many short e-mails from the same source as spam
Think about embedding live values into the mail messages to send more than one data point per mail.
... send e-mail through gmail / googlemail
If you have a mail account with Google, i.e. an e-mail address like john.doe@gmail.com, you can use gmail.com as the transport service ("the SMTP server").
"john.doe" - your user name (without the @gmail.com)
"mymailpassword" - the password of the google account
"john.doe@gmail.com" - the "From:" address
Please note:
You must use the correct "From" address
... send messages to Twitter
Teeken can post messages to Twitter, either as status updates to the timeline or as direct messages to a dedicated Twitter user.
Before Twitter will accept messages from Teeken, you must authorize it with Twitter. Use PLCTwithAuth to obtain the necessary keys from Twitter. This will generate a file named "PLCTwitKeys.ini" that should be stored in the same directory as Teeken.exe. Use login and password of the Twitter user that will appear as the sender of the tweets.
To post messages publicly into the senders timeline, create a receiver for Twitter in ´Teeken.ini`
receiver;"TweetThis"
adr;twitter
To send messages directly to a Twitter user, use their screen name as a parameter
receiver;"TweetDirect"
adr;twitter;"@tothisuser"
Please note, that
all tweets and direct messages are sent from the same Twitter account (the sender)
you can only send direct messages to users who are following the sender
Twitter will reject recurring tweets or messages with the same text
... push events to a smartphone immediately
Instant alerts on smartphones, known as push notifications, need a complex infrastructure of apps, servers and identification procedures multiplied by the number of platforms and operating systems for smartphones. This is beyond the reach of the Teeken application.
There are, however, other ways to receive instant alerts when a Teeken node is triggered.
Several services like Pushover provide methods to forward e-mails as push notifications to iPhone and Android. It works like this:
The text part of a node definition can contain references to any data point address of the same source.
References are written as absolute data point addresses, embraced in {{}}.
For example: 'node;a;e0.1;"Pieces made: {{DB4.DBW2}}";/mycounters;N' will be triggered when e0.1 becomes non-zero. The message text will be "Pieces made:", followed by the current value of DB4.DBW2.
A special address is {{*}}, which refers to the data point address of the node itself.
Example: 'node;a;c10;"Counter 10: {{*}}";/logger;T:*:*' will create a message like Counter 10:, followed by the current value of c10. It will be triggered every minute (T:*:*).
... poll a PLC/node only every n seconds
Teeken can be slowed down on three levels: 1) global (all sources), 2) on source level, 3) on node level
coupler;readinterval;<seconds> tells Teeken to pause <seconds> seconds between read cycles. No communication with devices or receivers will occur during the interval. Changes in node values may occur unnoticed.
set;readinterval;<seconds> can be written after a source or node line and does the same as above, but only for this source or this node.
Global settings beat local settings and source settings beat node settings. The global setting should therefore always define the shortest pause in the system.
... run only one cycle / until an event occurs
coupler;runmode;<mode> tells Teeken when to stop.
Meaning
cycle
Run continuously
single
Run only one cycle
trigger
Run until a trigger (of a node) fires
Default value, when no coupler;runmode is given, is cycle.
... change the configuration during runtime
Teeken checks wether the configuration file was changed and re-reads it, if so. To be sure that all changes are valid, the new configuration must be unchanged for 10 seconds.
To change the configuration during runtime:
make a copy of the current configuration
edit the copy
overwrite the original file with the new version.
PCcoupler will detect the change about 10 seconds after the original file has been overwritten.
When a new configuration is detected, Teeken will
terminate all connections
re-read the configuration
restart the connections
which is basically the same process as stopping and restarting Teeken.
Depending on the number of connections and connection types, this will take a few seconds.
... start Teeken at Windows start-up
Install Teeken
Write and test your configuration (Teeken.ini)
Go to Settings, Control Panel, Scheduled Tasks
Create a new task
Locate teeken.exe
Use When my computer starts
Open Advanced Properties
Ensure that Start in: points to the directory of teeken.exe
Frequently Asked Questions (FAQ)
Low-cost Modbus I/O devices
If you need some digital or analog inputs, counters, etc. to be monitored by Teeken, look for example here:
Wago Modular I/O. The 750 and 753 series with Ethernet fieldbus coupler responds to ModbusTCP. Digital and analog inputs available, also counters. Optional PLC modules can add intelligence.
Schneider-Electric Twido is a tiny, but complete PLC. Counters and analog values must be implemented in a Twido program.
Why no graphical Windows application?
Teeken is a pure "console application" without the normal graphical window, which has the following benefits:
The executable has a very small footprint
It needs no desktop, nor user account
It is independent of video resolution
It can run in background from Scheduled Tasks
Whats the maximum length of a message
The internal maximum of a fully expanded text message including embedded live values is 4000 characters. Some uplinks like Twitter have lower limits, so Teeken will shorten messages send to them. Twitter messages will be cut at 140 characters.
Known limits are:
Twitter messages (including the "d @username" part) will be cut at 140 characters
E-mail subject lines will not be cut, but some mail transport servers may refuse long lines
(c) KMB-Tools.
These pages were made with a text editor and MDSite.