Introduction to Properties
Property Definition
A Property consists of 2 parts:
Name - This is a mandatory part. It is a string and is a
key in a two column relational table. Although it is a string,
it can hold a number in string form. For example: 53213
Value - This is an optional part. It is a string and can
consist of multiple parts separated by some agreed upon delimiter
character. For example: "Milwaukee|Wisconsin|USA"
Properties can be used for just about anything. Some examples are:
- Fast keyed look ups for control values based on a lookup string,
such as in recipes, warehouse databases, etc.
- Like "environment variables" for configuration options (for
user defined instructions or drivers).
Properties are partitioned into separate property tables, called
property files. You can have up to 1000 property files, each with
thousands of properties. Providing support for multiple property
files allows for many many relational tables to be held.
Property files can be used for material handling or sorting applications.
For example, let's say you have parts coming onto a conveyor and
you read the part with either a bar code reader or an RFID sensor
to obtain a part number. A property file can hold the mappings
of the part number to a bin or conveyor gate number.
There are property lookup ladder instructions in SoftPLC that allow
fast lookups on a property file. In this example, from the part
number the bin number is quickly obtained.
A similar lookup can be performed on zipcode to obtain City and
State for automatic printing of a shipping label. |