Applies to:
PcVue 15.0 |
||
|
||
Summary:
When using Gateways with Node-RED intergrated in it, different manufacturers will have different versions of Node-RED installed on the Gateway and there would be times where certain functions of the gateway will be locked. As such, users are unable to install npm* on the linux part of the gateway, thus unable to download any nodes from the npm. Hence, in this KB, it will be discussed in an event where an input which is read by the Gateway from a source (e.g Modbus) returns an array instead of a JSON object. *npm is the world’s largest Software Library. It is also a software Package Manager and Installer. |
||
|
||
Details:
Going with the following Diagram 1, there are two Modbus inputs where it is reading the registers of a PLC.
Diagram 1
By directly tapping the message output from the PCD3_1 and PCD3_2, it can be seen that the outputs which are obtained from the nodes are in the form of an Array as shown in Image 1.
Image 1 In this case, PcVue would not be able to read it as a Register Variable using the MQTT format while it can setill be read by using a Text Variable. Image 2 in cases where certain elements would need to be displayed in as decimal points, due to the fact that it is not possible to change the scaling of the values of Internal Variables, then, the value would need to be processd as such before getting Published by the MQTT. Image 3 This would ensure that the values which are read by PcVue are of the right scaling without doing any additional expressions on PcVue’s side of things. Image 4 And when checked using MQTTfx or any equivalent MQTT Explorer, the follow results should be obtained. Image 5
Then, depending on the configuration which was done in the svmgrMQTT.ini, the general configuration for the variable would be as the following Text Attribute 15: JsonGetValue(value, ‘0’) And by following the example output from Image 5, the value 26.27 should be ontained by the Register Variable. Dowloadable File:
|
||
|
||
|
Created on: 06 Apr 2021 Last update: 30 May 2024