Telemetry Management

The telemetry must perform the following actions:

  • Get Data from real time PXI.

  • Save data locally for two days. And only two days.

  • Send data to TCS every 50 ms. (this can be configured by topic in the configuration file)

The mentioned actions are performed by two different tasks. One for getting the data and saving it locally, this task is called Telemetry logging task. The other for sending the received data to the TCS, this task is called TCP_Telemetry. These two tasks are explained in the next sections.

  • Telemetry logging task: This task is the one obtaining the data from the PXI.

  • TCP Telemetry task: This task is responsible of sending all the needed telemetry to the CSC over TCP.

This document also contains the documentation of the configuration files for the telemetry. These files are:

  • Topic Telemetry configuration file: defines all the telemetry to get from the PXI classified by topic, default name: “TelemetryTopicsConfiguration.ini”.

  • Window Telemetry configuration file: defines the telemetry to display in each window, default name: “HMIWindowsTelemetryVariables.ini”.

Telemetry configuration

Topic Telemetry configuration file

For telemetry definition there is a configuration file “TelemetryTopicsConfiguration.ini” in the configuration folder that defines all the telemetry to get from the real time target classified by topic.

The file has sections according to each topic, so each topic data is configured in the same place. In each section, there are 7 possible data types available: BOOL, DBL, DBL Array, Int32, String, String Array and Int64 Array, where DBL Array and Int64 Array are for high speed signals of DBLs and Int64. Each of the 7 data types correspond to an already coded class in the Telemetry Logging task, if any other data type is required new code must be added to read and process that new data type.

The structure used in the “TelemetryTopicsConfiguration.ini” file is the one generated by OpenG Variant Configuration file palette Vis when managing clusters and arrays. Each data type has as many elements as defined by “<size(s)>”, 0 means that this topic has no data of this type. The cluster has 5 fields for each variable that will be read from the PXI:

  • URL: This field defines the url of the network shared variable to read. This is the real identification of the topic since this is unique.

  • Unit: Units of the data. This data will be added to the saved files.

  • Comments: In this field some comments could be added. This data will be added to the saved files.

  • TCP_PublishName: here the name that will be used when publishing the data over TCP is specified.

  • TCP_Publish: this is a Boolean value, FALSE or TRUE that enables or disables the the publication of the variable over TCP.

Boolean and DBL Array data type examples:

Boolean Telemetry Data.<size(s)> = “2”

Boolean Telemetry Data 0.url = “psp://192.168.209.10/SafetyModbusComm/AZlimP”

Boolean Telemetry Data 0.Unit = “”

Boolean Telemetry Data 0.Comments = “Azimuth Positive power off limit switch AND topple block pos A”

Boolean Telemetry Data 0.TCP_PublishName = “aZlimP”

Boolean Telemetry Data 0.TCP_Publish = “FALSE”

Boolean Telemetry Data 1.url = “psp://192.168.209.10/SafetyModbusComm/AZlimN”

Boolean Telemetry Data 1.Unit = “”

Boolean Telemetry Data 1.Comments = “Azimuth Negative power off limit switch AND topple block pos B”

Boolean Telemetry Data 1.TCP_PublishName = “aZlimN”

Boolean Telemetry Data 1.TCP_Publish = “FALSE”

DBL Array Telemetry Data.<size(s)> = “24”

DBL Array Telemetry Data 0.url = “psp://192.168.209.10/PXIComm_NSV/Azimuth Angle Actual”

DBL Array Telemetry Data 0.Unit = “deg”

DBL Array Telemetry Data 0.Comments = “Actual position for azimuth axis”

DBL Array Telemetry Data 0.TCP_PublishName = “azimuthAngleActual”

DBL Array Telemetry Data 0.TCP_Publish = “TRUE”

DBL Array Telemetry Data 1.url = “psp://192.168.209.10/PXIComm_NSV/Azimuth Controller Angle Set”

DBL Array Telemetry Data 1.Unit = “deg”

DBL Array Telemetry Data 1.Comments = “Actual setpoint of azimuth axis”

DBL Array Telemetry Data 1.TCP_PublishName = “azimuthAngleSet”

DBL Array Telemetry Data 1.TCP_Publish = “TRUE”

Apart of the variables, each topic also includes the configuration for TCP publication as a topic. For configuring this there are two values:

  • TopicID: the identifier of the topic, this will be published as part of the tCP message to identify the Topic.

  • TopicFrequencyMultiple50ms: this value is used to configure the publication frequency of the topic.

Window Telemetry configuration file

For window telemetry definition there is a configuration file “HMIWindowsTelemetryVariables.ini” in the configuration folder that defines the telemetry to display in each window.

The file has sections according to each window, so each window reads this file to know which variables are needed for the window, this variables are then searched in the Topic Telemetry configuration file to get the URL that corresponds to each variable. In each section, there are 7 possible data types available, the same data types defined in the Topic Telemetry configuration file (see previous section).

The structure used in the “HMIWindowsTelemetryVariables.ini” file is the one generated by OpenG Variant Configuration file palette Vis when managing arrays. An example for the Azimuth cAble wrap is as follows:

[Azimuth Cable Wrap]

String Telemetry Variables.<size(s)> = “3”

String Telemetry Variables 0 = “PXIComm_NSV/ACW Status”

String Telemetry Variables 1 = “PXIComm_NSV/ACW Status Drive 1”

String Telemetry Variables 2 = “PXIComm_NSV/ACW Status Drive 2”

DBL Telemetry Variables.<size(s)> = “0”

DBL Array Telemetry Variables.<size(s)> = “7”

DBL Array Telemetry Variables 0 = “PXIComm_NSV/ACW Angle 1”

DBL Array Telemetry Variables 1 = “PXIComm_NSV/ACW Angle 2”

DBL Array Telemetry Variables 2 = “PXIComm_NSV/Azimuth Angle Actual”

DBL Array Telemetry Variables 3 = “PXIComm_NSV/ACW Speed 1”

DBL Array Telemetry Variables 4 = “PXIComm_NSV/ACW Speed 2”

DBL Array Telemetry Variables 5 = “PXIComm_NSV/CCW Current 1”

DBL Array Telemetry Variables 6 = “PXIComm_NSV/CCW Current 2”

Boolean Telemetry Variables.<size(s)> = “3”

Boolean Telemetry Variables 0 = “PXIComm_NSV/ACW Positive Direcctional limit Switch”

Boolean Telemetry Variables 1 = “PXIComm_NSV/ACW Negative Direcctional limit Switch”

Boolean Telemetry Variables 2 = “SafetyModbusComm/stoAZCW”

String Array Telemetry Variables.<size(s)> = “1”

String Array Telemetry Variables 0 = “PXIComm_NSV/ACW Interlocks”

INT32 Telemetry Variables.<size(s)> = “0”

Int64 Array Telemetry Variables.<size(s)> = “0”

Telemetry Configuration from Files Initialization

For reading and initializing the telemetry configuration from the previous mentioned 2 files there is a VI. This VI is explained in this section as it is assumed to be important.

VI description

Read the configuration files for the telemetry and initialize the FGV that will save the configuration for each execution.

ManageTelemetryConfiguration.lvlib_InitTelemetryConfigurationFromFiles.vi context help.abel{figureone7befdc9e76a314260fc13051309ae835}

Block diagram

ManageTelemetryConfiguration.lvlib_InitTelemetryConfigurationFromFiles.vi block diagram 1.abel{figuretwo1a954192cffd0f4ef5a9ac3e5c9cfeb2}

List of subVIs

GetTelemetryURLPath.vi context help.abel{figurethree932c280570d0c737c2ba57afcddb1822}

  • ManageTelemetryConfiguration.lvlib:FGV_TelemetryTopicsDefinitions.vi: FGV for window telemetry URLs

ManageTelemetryConfiguration.lvlib:FGV_TelemetryTopicsDefinitions.vicontext help.abel{figurefourefe2c371d95474c3f8c17acfd8618cc7}

  • ManageTelemetryConfiguration.lvlib:FGV_WindowTelemetryURLs.vi: FGV for window telemetry URLs

ManageTelemetryConfiguration.lvlib:FGV_WindowTelemetryURLs.vi contexthelp.abel{figurefivef87c209deb4287435884eb88f5d21f29}

  • ManageTelemetryConfiguration.lvlib:GetURLsForVariables.vi: Here the URL that corresponds to each variable type is obtained.

ManageTelemetryConfiguration.lvlib:GetURLsForVariables.vi contexthelp.abel{figuresix9889332db525a1aa3e56bdd9864e3a9e}

  • ManageTelemetryConfiguration.lvlib:GetURLsFromTopicDefinitions.vi: Get the URL from TopicDefinition for the specified VariableNames

ManageTelemetryConfiguration.lvlib:GetURLsFromTopicDefinitions.vicontext help.abel{figureseven03f751f23223ab9b166701c6f4c7d107}

  • ManageTelemetryConfiguration.lvlib:ItemNotFoundError.vi: Here the error is set explaining which item was not found while reading the TelemetryTopic configuration

ManageTelemetryConfiguration.lvlib:ItemNotFoundError.vi context help.abel{figureeight1be25e85fca41c98520182535244076d}

  • ManageTelemetryConfiguration.lvlib:ReadTelemetryTopicsConfigFile.vi: Read topics configuration file and save the read data into a FGV.

ManageTelemetryConfiguration.lvlib:ReadTelemetryTopicsConfigFile.vicontext help.abel{figurenine9b516e99237d8fa55da1f540d1738a5d}

  • ManageTelemetryConfiguration.lvlib:ReadWindowTelemetryURLs.vi: Reads the config file containing all the diferent URLs for all the requiered telemetry and adds this URLs to a FGV

ManageTelemetryConfiguration.lvlib:ReadWindowTelemetryURLs.vi contexthelp.abel{figureten60efce2ca841fb47f0e7953a672a7e4e}

  • NI_LVConfig.lvlib:Close Config Data.vi: Writes data to the platform-independent configuration file identified by refnum and then closes the reference to that file.

NI_LVConfig.lvlib:Close Config Data.vi context help.abel{figureeleven45706de65e90257748db382f3e31a123}

  • NI_LVConfig.lvlib:Get Section Names.vi: Gets the names of all sections from the configuration data identified by refnum.

NI_LVConfig.lvlib:Get Section Names.vi context help.abel{figuretwelveac1b2c087a7d2b3c665971b0369dafee}

  • NI_LVConfig.lvlib:Open Config Data.vi: Opens a reference to the configuration data found in a platform-independent configuration file.

NI_LVConfig.lvlib:Open Config Data.vi context help.abel{figurethirteene1e59827118c4533c7774a5cfc6a4fcc}

  • Read Key (Variant)__ogtk.vi: Reads a value associated with key in a specified section of the configuration data identified by refnum. If “key” input is not specified, the name of the variant object is used as the key. the “found?” output will be TRUE for compount objects (clusters) only if all elements (recursively) are found. For example a Boolean named “Enable” with a value of TRUE would correspond to the key-value pair: Enable=TRUE Note: Special characters in section and key names will be escape-coded. These include the following: \00-\1F (non-printable chars); “[”, “]”, and “=” (INI syntax elements); \FE (“þ”) and \FF (“ÿ”) (legacy bracket encoding); Additionally, the escape character, “\”, will be escaped as “\”.

Read Key (Variant)__ogtk.vi context help.abel{figurefourteenef7f95b8a83143d2eb6da1cc37e37162}

Telemetry logging task

This task is the one obtaining the data from the PXI. This task does two main things:

  1. Read the data from the PXI and store it in memory. To be accessible by the rest of tasks/windows that may need the data.

  2. Save the read data in TDMS format locally, as said before for 2 days. This files after a certain time are zipped (conversion to *.zip) to reduce space in the hard drive.

For doing this the variables are read from the PXI using the URLs defined at the Topic Telemetry configuration file. Part of this task is also configured using the “HMIConfig.xml” file, as it is considered to be general configuration and not topic specific configuration. The configuration values obtained from that file are:

  • File_Saving_directory_path: this is a relative path starting at the project location.

  • HMIWindowsTelemetryVariables_file_path: here the absolute path to the Window Telemetry configuration file is specified.

  • TelemetryTopics_file_path: here the absolute path to the Topic Telemetry configuration file is specified.

  • DataAcquieringLoopFrequency_ms: this value corresponds to the timing of the acquisition loop of the telemetry variables in mili seconds.

  • Telemetry_Decimate_Save: this value is used to avoid overloading when saving, this value is used to divide the saving into bigger arrays to save into the TDMS, the value corresponds to the iteration multiple of the data acquisition loop. This means that with a default value of 10 the arrays with 50 values obtained every 50 ms are saved every (10*50ms) 500 ms in arrays of 500 values size.

  • TelemetryTaskConfig.DataHistoryDays: this value corresponds to the maximum value of stored data in days. The default value is 2, this means that files older than 2 days will be erased.

  • TelemetryTaskConfig.SecondsToLeaveUnZipped: this value, in seconds, corresponds to the minimum time for TDMS files to be unzipped. This means that the last TDMS to be zipped will be the actual time minus this value. With the default value of 3600, means that there will be unzipped files for the last hour.

Task process

This task was created using the NI GOOP Developing Suite, this task is object oriented and the communication between methods is done using queues and user events. The task main is contained in the process.vi, here there are 6 loops.

  • The loop on top is used for CMD reception.

  • The Data acquiring loop, is the one reading the network shared variables from the PXI.

  • The Data saving loop, is the one that writes the acquired data to TDMS.

  • The Check variables connection loop, this loop is used to reconnect the variables that may fail when read in the Data acquiring loop.

  • UpdateActualData loop, this loop gets the data from the Data acquiring loop and stores it into a DVR to be accessible by other tasks.

  • SendActualDataEvent loop, this event gets the data from the Data acquiring loop and publishes an event with the DBL and DBL Array data types. This event is used in the windows only, to plot the values into graphs.

Telemetry Logging task Processabel{figurefifteen7293ce79e1e4a1065905e07662a6e44b}

CMD Reception loop

This loop receives the CMDs from the methods and passes the required actions to the corresponding loop.

Init

Here the initialization actions are executed.

TelemetryLogingTask.lvclass_Process.vi Init.abel{figuresixteen8311c37d8944346ab1740963faa90d5e}

Idle

This state is executed constantly after executing every new CMD, here the events created at the methods are received and executed in the next iteration.

TelemetryLogingTask.lvclass_Process.vi Idle.abel{figureseventeen30bfc3bdc24eac36d8a005f25bfcfce9}

Timeout

This state is executed when there is something that must be executed in the specified timeout of the Idle state event structure.

TelemetryLogingTask.lvclass_Process.vi Timeout from Idle case.abel{figureeighteenbf718aee9ca894c6d1f75669252159c0}

TelemetryLogingTask.lvclass_Process.vi Timeout.abel{figurenineteene7d944f4767feb45d0aad87d5ef6afdb}

CMD-ShowWindow

This state is used to show the front panel of the process.

Loop states: CMD-ShowWindowabel{figuretwenty0ad63204c3947d40e72ec4484c372f55}

CMD-HideWindow

This state is used to hide the front panel of the process.

Loop states: CMD-HideWindowabel{figuretwenty-one7c0492c6c1e98121de21d12fb8c94a15}

CMD-AddVariable

Verify if the variable exists, if not the variable is connected and added other ways not.

TelemetryLogingTask.lvclass_Process.vi CMD-AddVariable.abel{figuretwenty-two96f34d720e2ab198301ac52f9de37f39}

CMD-AddVariableHHD

Verify if the variable exists, if not the variable is connected but NOT ADDED, this would be made by another method that will add only the variables needed for the loaded window.

TelemetryLogingTask.lvclass_Process.vi CMD-AddVariableHHD.abel{figuretwenty-three0675042b5005091b18d50cdf6e43b3a8}

CMD-MonitorVariablesHHD

Verify if the variable exists, if not the variable is added other ways not. If monitor is true, the variable is added for monitoring if false its removed from monitoring.

TelemetryLogingTask.lvclass_Process.vi 3.2.1.1.8CMD-MonitorVariablesHHD.abel{figuretwenty-four8424653992a843cf12dd11c04b66713e}

CMD-Adquisition

Manage the variables acquisition, start or stop it.

TelemetryLogingTask.lvclass_Process.vi CMD-Adquisition.abel{figuretwenty-fiveb28672a598875ebbe1650a921544bd4a}

CMD-ChangeSaveFilePath

Change the path for saving the telemetry, send the new path to the Data Saving Loop.

TelemetryLogingTask.lvclass_Process.vi CMD-ChangeSaveFilePath.abel{figuretwenty-six9c2020392132ea2f8398b87997cc7f45}

CMD-SaveData

Manage the data saving, start or stop it.

TelemetryLogingTask.lvclass_Process.vi CMD-SaveData.abel{figuretwenty-seven39b15447144c594574394b2fd21d98d2}

CMD-Error

Get the error and set it to the error line, this will make the task to go to the Error case and process it there.

TelemetryLogingTask.lvclass_Process.vi CMD-Error.abel{figuretwenty-eight62b194306cbe46243a7474ffd683cd3c}

Error

Send the error from the error line to the Error Task.

TelemetryLogingTask.lvclass_Process.vi Error.abel{figuretwenty-nine6785cc72b418dad3d25e4ae274e5ee94}

CMD-Shutdown

Here the actions to shutdown the task are executed.

TelemetryLogingTask.lvclass_Process.vi CMD-Shutdown.abel{figurethirty26eadf8e759401cd24c2c7b5f59aed90}

Data Acquiring Loop

The Data acquiring loop, is the one reading the network shared variables from the PXI. This loop then sends the data to the other loops to manage it as intended in each case.

Data Acquiring loopabel{figurethirty-one740e407d42cb98219f98ec3b3bf912d9}

Data Saving Loop

The Data saving loop, is the one that writes the acquired data to TDMS.

Data Saving Loopabel{figurethirty-twobca3b2d13dea126c1c7a08e65b886447}

Check Variables Connection Loop

The Check variables connection loop, this loop is used to reconnect the variables that may fail when read in the Data acquiring loop.

Check Variables Connection Loopabel{figurethirty-three38506fa5d1e4b69bfb42127ae0c034a1}

Update Actual Data Loop

Update Actual Data loop, this loop gets the data from the Data acquiring loop and stores it into a DVR to be accessible by other tasks.

Update Actual Data loopabel{figurethirty-four5850dea623cf2e23c01cf8b02e1135e0}

Send Actual Data Event loop

Send Actual Data Event loop, this event gets the data from the Data acquiring loop and publishes an event with the DBL and DBLarray data types. This event is used in the windows only, to plot the values into graphs.

Send Actual Data Event loopabel{figurethirty-five072e7885289d9cdf9b59e1ca09da795b}

Task methods

Here the available methods for this task are explained.

AddVariableMethodChoice

This method selects which add variable method must be used depending on the current device Global variable (EUI or HHD).

TelemetryLogingTask.lvclass_AddVariableMethodChoice.vi context help.abel{figurethirty-six53be36f00dc8796f1c8f39eac263ce0a}

AssignInitClasses

Here the telemetry variable objects are initialized using the TelemetryTopicDefinitions.

TelemetryLogingTask.lvclass_AssignInitClasses.vi context help.abel{figurethirty-seven9f8244908aae0722aa7189e48e01411c}

ChangeFileSavingPath

Change the file path to save the telemetry data

TelemetryLogingTask.lvclass_ChangeFileSavingPath.vi context help.abel{figurethirty-eightf0a19ed5efd534092c4cf72ee77df262}

CleanUp

execute the clean up actions for the task

- Stop the process.vi

- Release queues

- Destroy user events

- Delete DVRs

TelemetryLogingTask.lvclass_CleanUp.vi context help.abel{figurethirty-nine59d21d74e8eb543d6ada5126d42eac44}

GetAllTelemetry

Returns the data from the actualDataDVR

TelemetryLogingTask.lvclass_GetAllTelemetryData.vi context help.abel{figurefortyf87d89733b4735a12ba8402da31d3385}

GetTelemetryDataURL

Returns the data from the queue

TelemetryLogingTask.lvclass_GetTelemetryDataURL.vi context help.abel{figureforty-one8677c0910f62436c759c00f690dc31b7}

ManageAdquisition

Manages the adquisition of the telemetry task

TelemetryLogingTask.lvclass_ManageAdquisition.vi context help.abel{figureforty-two5c56b96c5e6c7b4f0a6976dbae0e6983}

ManageSaveData

Turns on or off the telemetry data saving to file (tdms).

TelemetryLogingTask.lvclass_ManageSaveData.vi context help.abel{figureforty-three34e43cdc74247e08a48a2f92165ace62}

MonitorVariablesHHD

Adds a variable to the telemetry task for the HHD system

TelemetryLogingTask.lvclass_MonitorVariablesHHD.vi context help.abel{figureforty-fourb95840eb2a61e258a9b2e0cb5efb1cb1}

Read TelemetryEvent

Gets the TelemetryEvent reference from the class object

TelemetryLogingTask.lvclass_Read TelemetryEvent.vi context help.abel{figureforty-five66df1ee3843d6e7484785398e7f43a8c}

TelemetryFilePathCreation

Generates the path to save the telemetry data for each 10 minutes

TelemetryLogingTask.lvclass_TelemetryFilePathCreation.vi contexthelp.abel{figureforty-sixecd57eb2f56ddaff20b6ab61bc26755f}

TelemetryLogingTask_Init

Initialize the telemetry process. Also includes the compression of old telemetry files (TDMS) onto zip files.

TelemetryLogingTask.lvclass_TelemetryLogingTask_Init.vi context help.abel{figureforty-sevend887f610e8f5256f3439d49b30370af3}

TCP Telemetry task

This task is responsible of sending all the needed telemetry to the CSC over TCP.

Task process

This task was created using the NI GOOP Developing Suite, this task is object oriented and the communication between methods is done using queues and user events. The task main is contained in the process.vi, here there are two loops. The loop on top is used for CMD reception and the bottom one for publishing. This process has only one instance that manages all the telemetry data.

TCP Telemetry taskabel{figureforty-eight57911673c165a91823df05097d5c7442}

CMD Reception loop

This loop receives the CMDs from the methods and passes the required actions to the publishing loop.

Init

Here the initialization actions are executed.

Loop states: Initabel{figureforty-nine34c5e7d190b5f2b833b64116c31a6ad0}

Idle

This state is executed constantly after executing every new CMD, here the events created at the methods are received and executed in the next iteration.

Loop states: Idleabel{figurefifty40f48445aaeade20137616f190917a6b}

Timeout

This state is executed when there is something that must be executed in the specified timeout of the Idle state event structure, see Figure \ref{figurefifty-onef7565b74148bf04cd1f4f1fb69d642c1}.

Timeout state from Idle stateabel{figurefifty-onef7565b74148bf04cd1f4f1fb69d642c1}

Loop states: Timeoutabel{figurefifty-two1c6be57a00e3acfe2cfb544b4d0c8a35}

CMD-ShowWindow

This state is used to show the front panel of the process.

Loop states: CMD-ShowWindowabel{figurefifty-three2fc66861285c454098d66de610dc1d43}

CMD-HideWindow

This state is used to hide the front panel of the process.

Loop states: CMD-HideWindowabel{figurefifty-fourb2c602d1f37e364f2519be97641fca53}

CMD-StartPublish

This state is executed when the StartPublish method is used. Here the TCP publishing loop is started.

Loop states: StartPublishabel{figurefifty-five07eecdfe1b0bf76d578e653d2dc99cb0}

CMD-StopPublish

This state is executed when the StopPublish method is used. Here the TCP publishing loop is stopped.

Loop states: CMD-StopPublishabel{figurefifty-six7af6afa7a6f49eb99ab7e6dd1209a961}

SendError

This state is executed when the SendError CMD is received, this CMD is sent by the TCP publishing loop at the error handling state. Here the received error is set to the error line to enter the error case in the next iteration.

Loop states: CMD-SendErrorabel{figurefifty-seven2b4ce927215df8a95583195975f4b0f8}

Error

This state is reached when an error occurred at the loop or is received from the publishing loop. Here the error is posted to the error task.

Loop states: Errorabel{figurefifty-eight222a40c7a37a1bd9230765494fd30140}

CMD-Shutdown

This state is reached when the shutdown CMD is received. This loop is used to stop the TCP publishing loop.

Loop states: CMD-Shutdownabel{figurefifty-nineae4724af78adecc36068d2740940da76}

TCP Publishing loop

This loop is responsible of publishing the telemetry over TCP. This loop contains a very simple state machine with 5 states, each of them is explained in the upcoming sections.

Publishing loopabel{figuresixtyd5b66fb6e3281d51754fc31ae2d32615}

Init

This state is launched at start. Here the DVR with the loop data is initialized to default values. The next state is launched: Wait.

Loop states: Initabel{figuresixty-one3a56ace2e388ce99cae68b6dea2e23a2}

Wait

Here the data for the loop is read from the DVR.

  • If Publish?=True the next state is launched: Read&PublishData

  • If Publish?=False the next state is launched: Wait

Loop states: Waitabel{figuresixty-two1421f7884dabfe8d9030bb9180114d1c}

Read&PublishData

Here the data for the loop is read from the DVR and the main task of this loop is done: read telemetry and publish it over TCP.

  • If Publish?=True the next state is launched: Read&PublishData

  • If Publish?=False the next state is launched: Wait

Loop states: Read&PublishDataabel{figuresixty-threedf83acb1801c5dbd2132c53d86849c98}

ErrorHandling

The state machine guard launches this state if there is an error at the error line from the previous state. Here the error is posted to the CMD reception loop.

Loop states: ErrorHandlingabel{figuresixty-four87c460727b18724299503ccd26c36aff}

Exit

This state is launched from the guard and launches when the loop data DVR exit is set to true. Here the loop is stopped.

Loop states: Exitabel{figuresixty-fivee3439cbac99d63a060c2872de48c6603}

Task methods

Here the available methods for this task are explained.

TCP_Telemetry_Init

This VI is used to launch the process, to do so some inputs are required:

  • Telemetry Task Reference: here the reference to the telemetry task is given to be able of reading the telemetry from inside the task.

  • Telemetry URL config file path in: Topic Telemetry configuration file.

  • HMIconfig XML File Path in: here the general configuration file “HMIConfig.xml” must be given.

Task method: TCP_Telemetry_Initabel{figuresixty-sixfaa4e9a776a49e7524458218e575eb42}

CleanUp

This VI is used to stop the task and release all the references generated for this task.

Task method: CleanUpabel{figuresixty-sevene390bc701734422389895c0d5884c582}

ControlProcessWindow

This VI is used to show or hide the process front panel. Depending on the ShowProcessWindow control value.

Task method: ControlProcessWindowabel{figuresixty-eight42d6a3e3c5bc8c2b4adb6aa2d8bc87d7}

StartPublish

This VI is used to start publishing data over TCP.

Task method: StartPublishabel{figuresixty-ninecc4a2c2fa63eb088ad2a7e9c8a6d6123}

StopPublish

This VI is used to start publishing data over TCP.

Task method: StopPublishabel{figureseventyf9c0e562997f5a97f2c1362d44cf9d86}

CheckObjectInitialized

This VI is used to check if the object was initialized or not.

Task method: CheckObjectInitializedabel{figureseventy-one518e51182596fd253a1819ac49ceb70e}

Testing

There is a project created to test that both tasks work properly. This project is located inside the “HMIComputers” repository inside the TCP_Telemetry folder, relative path: “HMIComputers\TCP_Telemetry\TestTCP_Task\TestTCP_Task\TestTCP_Task.lvproj”.

Note: To run this test the “jki_labs_tool_vi_tester” package must be installed, it can be found in the VI package manager or here: https://www.vipm.io/package/jki_labs_tool_vi_tester/

TestTCP_Task project viewabel{figureseventy-twoc890b7591bc2731374626ffcf443665b}

To execute the test, follow these steps:

  1. Go to “Tools >> VI Tester >> Test Vis…” (see Figure \ref{figureseventy-three82e7710b0a2bfe47ecc3d9133390240e}).

Open the VI Testerabel{figureseventy-three82e7710b0a2bfe47ecc3d9133390240e}

  1. After opening the VI Tester the window should look like Figure \ref{figureseventy-four8bb99b74ac6211d5f5566e390b3f9cdf}.

VI Tester after openingabel{figureseventy-four8bb99b74ac6211d5f5566e390b3f9cdf}

  1. Run the test, click on the green play button, see Figure \ref{figureseventy-five51ed8c8cb3aaade4e0dfff636a7142e9}.

Run test from VI Testerabel{figureseventy-five51ed8c8cb3aaade4e0dfff636a7142e9}

  1. Check test results, the result must be passed as shown in Figure \ref{figureseventy-six7342723fa19ba888fc82330a69980371}.

Test results.abel{figureseventy-six7342723fa19ba888fc82330a69980371}

  1. Close the VI Tester and the TestTCP_Task.lvproj.