• No results found

Creating variables by importing

In document zenon driver manual S7_NT v.7.10 (Page 30-38)

2.6 Creating variables

2.6.4 Creating variables by importing

Variables can also be imported by importing them. The XML and DBF import is available for every driver.

Info

You can find details on the import and export of variables in the Import-Export (main.chm::/13028.htm) manual in the Variables (main.chm::/13045.htm) section.

31

XML import of variables from another zenon project

For the import/export of variables the following is true:

The import/export must not be started from the global project.

The start takes place via:

Context menu of variables or data typ in the project tree

or context menu of a variable or a data type

or symbol in the symbol bar variables

Attention

When importing/overwriting an existing data type, all variables based on the existing data type are changed.

There is a data type XYZ derived from the type INTwith variables based on this data type. The XML file to be imported also contains a data type with the name XYZ but derived from type STRING. If this data type is imported, the existing data type is overwritten and the type of all variables based on it is adjusted. I.e. the variables are now no longer INT variables, but STRING variables.

DBF Import/Export

Data can be exported to and imported from dBase.

Info

Import and Export via CSV or dBase supported; no driver specific variable settings, such as formulas. Use export/import via XML for this.

IMPORT DBF FILE To start the import:

1. right-click on the variable list

32 2. in the drop-down menu of Extended export/import... select the Import dBase command 3. follow the import assistant

The format of the file is described in the chapter File structure.

Info

Note:

Driver object type and data type must be amended to the target driver in the DBF file in order for variables to be imported.

dBase does not support structures or arrays (complex variables) at import.

EXPORT DBF FILE To start the export:

1. right-click on the variable list

2. in the drop-down menu of Extended export/import... select the Import dBase command 3. follow the export assistant

Attention

DBF files:

must correspond to the 8.3 DOS format for filenames (8 alphanumeric characters for name, 3 character suffix, no spaces)

must not have dots (.) in the path name.

e.g. the path C:\users\John.Smith\test.dbf is invalid.

Valid: C:\users\JohnSmith\test.dbf

must be stored close to the root directory in order to fulfill the limit for file name length including path: maximum 255 characters

The format of the file is described in the chapter File structure.

Info

dBase does not support structures or arrays (complex variables) at export.

File structure of the dBase export file.

33 The dBaseIV file must have the following structure and contents for variable import and export:

34

Attention

dBase does not support structures or arrays (complex variables) at export.

DBF files must:

conform with there name to the 8.3 DOS format (8 alphanumeric characters for name, 3 characters for extension, no space)

Be stored close to the root directory (Root)

DESIGN

Description Type Field size Comment KANALNAME Char 128 Variable name.

The length can be limited using the MAX_LAENGE entry in project.ini.

KANAL_R C 128 The original name of a variable that is to be replaced by the new name entered under "VARIABLENNAME" (field/column must be entered manually).

The length can be limited using the MAX_LAENGE entry in project.ini.

KANAL_D Log 1 The variable is deleted with the 1 entry (field/column has to be created by hand).

TAGNR C 128 Identification.

The length can be limited using the MAX_LAENGE entry in project.ini.

Unit C 11 Technical unit

DATENART C 3 Data type (e.g. bit, byte, word, ...) corresponds to the data type.

KANALTYP C 3 Memory area in the PLC (e.g. marker area, data area, ...) corresponds to the driver object type.

HWKANAL Num 3 Bus address

BAUSTEIN N 3 Datablock address (only for variables from the data area of the PLC)

ADRESSE N 5 Offset

35 BITADR N 2 For bit variables: bit address

For byte variables: 0=lower, 8=higher byte

For string variables: Length of string (max. 63 characters) ARRAYSIZE N 16 Number of variables in the array for index variables

ATTENTION: Only the first variable is fully available. All others are only available for VBA or the Recipe Group Manager LES_SCHR R 1 Write-Read-Authorization

0: Not allowed to set value.

1: Allowed to set value.

MIT_ZEIT R 1 time stamp in zenon zenon (only if supported by the driver) OBJEKT N 2 Driver-specific ID number of the primitive object

comprises TREIBER-OBJEKTTYP and DATENTYP SIGMIN Float 16 Non-linearized signal - minimum (signal resolution) SIGMAX F 16 Non-linearized signal - maximum (signal resolution) ANZMIN F 16 Technical value - minimum (measuring range) ANZMAX F 16 Technical value - maximum (measuring range) ANZKOMMA N 1 Number of decimal places for the display of the values

(measuring range)

UPDATERATE F 19 Update rate for mathematics variables (in sec, one decimal possible)

not used for all other variables MEMTIEFE N 7 Only for compatibility reasons

HDRATE F 19 HD update rate for historical values (in sec, one decimal possible) HDTIEFE N 7 HD entry depth for historical values (number)

NACHSORT R 1 HD data as postsorted values

DRRATE F 19 Updating to the output (for zenon DDE server, in [s], one decimal possible)

HYST_PLUS F 16 Positive hysteresis, from measuring range HYST_MINUS F 16 Negative hysteresis, from measuring range PRIOR N 16 Priority of the variable

REAMATRIZE C 32 Allocated reaction matrix

36 ERSATZWERT F 16 Substitute value, from measuring range

SOLLMIN F 16 Minimum for set value actions, from measuring range SOLLMAX F 16 Maximum for set value actions, from measuring range VOMSTANDBY R 1 Get value from standby server; the value of the variable is not

requested from the server but from the standby-server in redundant networks

RESOURCE C 128 Resources label.

Free string for export and display in lists.

The length can be limited using the MAX_LAENGE entry in project.ini.

ADJWVBA R 1 Non-linear value adaption:

0: Non-linear value adaption is used 1: Non-linear value adaption is not used

ADJZENON C 128 Linked VBA macro for reading the variable value for non-linear value adjustment.

ADJWVBA C 128 ed VBA macro for writing the variable value for non-linear value adjustment.

ZWREMA N 16 Linked counter REMA.

MAXGRAD N 16 Gradient overflow for counter REMA.

Attention

When importing, the driver object type and data type must be amended to the target driver in the DBF file in order for variables to be imported.

LIMIT DEFINITION

Limit definition for limit values 1 to 4, and status 1 bis 4:

37 Description Type Field size Comment

AKTIV1 R 1 Limit value active (per limit value available)

GRENZWERT1 F 20 hnical value or ID number of a linked variable for a dynamic limit (see VARIABLEx)

(if VARIABLEx is 1 and here it is -1, the existing variable linkage is not overwritten)

SCHWWERT1 F 16 Threshold value for limit

HYSTERESE1 F 14 Is not used

BLINKEN1 R 1 Set blink attribute

BTB1 R 1 Logging in CEL

ALARM1 R 1 Alarm

DRUCKEN1 R 1 Printer output (for CEL or Alarm)

QUITTIER1 R 1 Must be acknowledged

LOESCHE1 R 1 Must be deleted

VARIABLE1 R 1 Dyn. limit value linking

the limit is defined by an absolute value (see field GRENZWERTx).

FUNC1 R 1 Functions linking

ASK_FUNC1 R 1 Execution via Alarm Message List FUNC_NR1 N 10 ID number of the linked function

(if “-1” is entered here, the existing function is not overwritten during import)

A_GRUPPE1 N 10 Alarm/event group

A_KLASSE1 N 10 Alarm/event class

MIN_MAX1 C 3 Minimum, Maximum

FARBE1 N 10 Color as Windows coding

GRENZTXT1 C 66 Limit value text

A_DELAY1 N 10 Time delay

INVISIBLE1 R 1 Invisible

38 EXPRESSIONS IN THE COLUMN "COMMENT" REFER TO THE EXPRESSIONS USED IN THE DIALOG BOXES FOR THE DEFINITION OF VARIAB LES. FOR MORE INFORMATION, SEE CHAPTER VARIABLE DEFINITION.

In document zenon driver manual S7_NT v.7.10 (Page 30-38)

Related documents