Aleksandra
Member
Hello everyone,
I have met the following issue in a project: there is an I/O field where you can set parameter "number of decimal places" for an analog value which is displayed in another I/O field on the screen. The allowed values are from 0 to 3 (0 - for zero decimal places, 3 - for three decimal places). Depending on the chosen parameter - this should provoke a change in the analog value I/O field, so that the analog value is displayed in the appropriate chosen format (i.e. with the chosen number of decimal places).
The way that this have been solved before is by having four I/O fields which are manipulated by the visibility property (for example, if parameter "2" is chosen, then only the I/O field with 2 decimal places format will be visible, and the other three will be invisible).
I believe there should be more elegant solution, but I don't come up with one. One solution would be to divide analog value directly in a FB, but I guess this would enlarge cycle time? But, on the other hand, why use four I/O fields for a single tag?
Anyone with a more clever solution?
I have met the following issue in a project: there is an I/O field where you can set parameter "number of decimal places" for an analog value which is displayed in another I/O field on the screen. The allowed values are from 0 to 3 (0 - for zero decimal places, 3 - for three decimal places). Depending on the chosen parameter - this should provoke a change in the analog value I/O field, so that the analog value is displayed in the appropriate chosen format (i.e. with the chosen number of decimal places).
The way that this have been solved before is by having four I/O fields which are manipulated by the visibility property (for example, if parameter "2" is chosen, then only the I/O field with 2 decimal places format will be visible, and the other three will be invisible).
I believe there should be more elegant solution, but I don't come up with one. One solution would be to divide analog value directly in a FB, but I guess this would enlarge cycle time? But, on the other hand, why use four I/O fields for a single tag?
Anyone with a more clever solution?