Utilities
Additional VIs can be found under Utilities.
Check License
The Check License block checks the target system for a valid TF3710 TwinCAT 3 Interface for LabVIEW™ license.
Input/output | Meaning |
---|---|
[0] Handle | The handle to the client |
[5] Target/Symbol | ADS target as string consisting of AMSNetId or ADS symbol as string consisting of AMSNetId and symbol name |
[4] Handle | The handle to the client |
[6] Target/Symbol | ADS target as string consisting of AMSNetId or ADS symbol as string consisting of AMSNetId and symbol name |
[8] LicenseInfo | LabVIEW™ cluster consisting of three elements:
|
Get Device State
The Device State block is a polymorphic VI and can be operated as Get Device State and Set Device State.
The operation mode Get Device State reads the current state of the target system and the PLC.
The following table describes the ADS port and its meaning:
ADS Port | ADS State | State |
---|---|---|
TC3 PLC Port > 851 | ADS_STATE_RUN | PLC is running. |
| ADS_STATE_STOP | PLC is stopped. |
| ADS_STATE_RESET | PLC is reset. |
System Port = 10000 | ADS_STATE_RECONFIG | TwinCAT is in Config mode. |
| ADS_STATE_RESET | TwinCAT is in Run mode. |
Input/output | Meaning |
---|---|
[0] Handle | The handle to the client |
[5] Target | ADS target as string consisting of AMSNetId |
[4] Handle | The handle to the client |
[6] Target | ADS target as string consisting of AMSNetId |
[8] Device State | State of the target system (ENUM) |
[10] ADS State | State of the PLC (ENUM) |
Set Device State
The Set Device State block changes the current state of the target system and the PLC.
With a specific ADS Port and ADS State the PLC or TwinCAT can be set to a corresponding state. The following table describes the ADS port and its usage:
ADS Port | ADS State | State |
---|---|---|
TC3 PLC Port > 851 | ADS_STATE_RUN | Starts the PLC. |
| ADS_STATE_STOP | Stops the PLC. |
| ADS_STATE_RESET | Resets the PLC. |
System Port = 10000 | ADS_STATE_RECONFIG | Puts TwinCAT in Config mode. |
| ADS_STATE_RESET | Puts TwinCAT in Run mode. |
Input/output | Meaning |
---|---|
[0] Handle | The handle to the client |
[5] Target | ADS target as string consisting of AMSNetId |
[7] Device State | New state of the target system (numeric) |
[9] ADS State | New state of the PLC (ENUM) |
[4] Handle | The handle to the client |
[6] Target | ADS target as string consisting of AMSNetId |
Get Version Info
The Get Version Info block returns the current version of the TF3710 setup and the installed TF3710 library as a LabVIEW™ string.
Output | Meaning |
---|---|
[6] ProductVersion | Setup version as string |
[8] FileVersion | Version of the installed TF3710 library as string |
Generate Type
The Generate Type block automatically generates the LabVIEW™ data type based on a TypeInfo description from a TwinCAT 3 data type.
The LabVIEW™ type can be inserted as a constant or control on a block diagram or saved as a LabVIEW™ ctl file. The Generate Type block is a wrapper VI and uses low-level class objects from TypeGenerator together with the TypeResolver. There are several ways in which the wrapper block can be parameterized.
- The TypeResolver is already initialized externally and LabVIEW™ already has a TypeHandle. The bAutoInit flag has the value "False":
- The TypeResolver already has information regarding the TwinCAT 3 data type.
- The wrapper block can generate the new type.
- The example Generate Type using Symbol Interface or Symbol's file uses this method.
- The TypeResolver is not initialized externally and LabVIEW™ does not have a TypeHandle. The bAutoInit flag has the value "True":
- The TypeResolver has no information regarding the TwinCAT 3 data type.
- The wrapper block needs the TypeInfo to generate the type.
- The example Generate Type using TypeInfo file uses this method.
Input/output | Meaning |
---|---|
[0] Handle | The handle to the client |
[1] bAutoInit | Boolean flag (True = TypeResolver is initialized internally, otherwise False) |
[2] Saving Info | LabVIEW™ cluster consisting of three elements:
|
[3] VI Refnum | A static VI Refnum |
[5] TypeHdl | The handle to the TypeResolver |
[7] Symbol Group | LabVIEW™ Enum:
|
[9] TypeInfo | LabVIEW™ string as XML description of TwinCAT 3 data type |
[12] Block Diagram Type Stype | LabVIEW™ Enum:
|
[13] Control/Indicator/Constant Name | LabVIEW™ string. Empty string: Default name of the TypeInfo. Otherwise: Name of the Control/Indicator/Constant. |
[8] Generated Type Name | LabVIEW™ string as the name of the generated type |
[10] Loaded Type | LabVIEW™ Enum |
"Symbol Group" parameter The Symbol Group parameter can be used to select whether a control/display element must be generated. For the control, the TypeGenerator generates the type without name, because the TypeResolver supports the control without name. If the control is a LabVIEW™ cluster, then the cluster members are also generated without names. |