Skip to content

Fix: Scaling analog outputs #11

Description

@arjendeetman

The values on the OPC UA server on the material delivery plc and vertico dosing system plc are scaled incorrectly on the PLC itself. The values are now corrected in Node-RED but must be scaled on the PLCs for consistency.

Currently, on the PLC, the values are scaled from 0-32767 to 4-20 mA. This is incorrect since the overrange and overflow are not taken into account.

Proposed solution: Don't convert the values to 4-20 mA on the PLC and make the range of 0-32767 available (as for the analog inputs). Scaling the values to 4-20 mA can be done in the data logger.

Analog output module: ET 200SP Analog Output Module AQ 4xU/I ST (6ES7135-6HD00-0BA1)
https://cache.industry.siemens.com/dl/files/612/59753612/att_886744/v1/et200sp_aq_4xu_i_st_manual_en-US_en-US.pdf

image

The output has been checked with a 470 ohm resistor and a multi-meter.

Old situation:

I U Calculated resistance
mA V ohm
4 1.88 470
5 2.43 486
6 2.99 498
7 3.55 507
8 4.1 513
9 4.66 518
10 5.22 522
11 5.77 525
12 6.33 528
13 6.89 530
14 7.45 532
15 8 533
16 8.56 535
17 9.12 536
18 9.67 537
19 9.87 519
20 9.87 494

After applying corrections in Node-RED:

I U Calculated resistance
mA V ohm
4 1.88 470
5 2.35 470
6 2.82 470
7 3.29 470
8 3.75 469
9 4.23 470
10 4.7 470
11 5.17 470
12 5.63 469
13 6.11 470
14 6.58 470
15 7.04 469
16 7.52 470
17 7.99 470
18 8.46 470
19 8.93 470
20 9.39 470

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions