Siemens MW variables into TEXT

Hi all,
I am trying to connect an INT variable from the S71500 (MW100) to an Object to be able to display it as a TEXT, in order to visualise the number of pieces I am counting in a process line.
But I have problems because I don’t know how to link a variable MWxxx from the S71500 to an input variable of an Object.
I am trying to modify the exercise: Simumatik Academy - Courses - Adding Text Geometry To A Component, but I don’t get anything.
Can someone help me with my problem? Is it possible?
Thanks
Haritz

Hi,
Thanks for the question. To program a system using a PLC, start by adding a controller component that matches your protocol and input/output requirements. In the public “Controllers” library there are some options, for example, the “PLC 8IO OPCUA” for OPC UA, or the " Siemens S1200 CPU" with the s7Protocol driver. These can communicate with your PLC (real or simulated) and the inputs/outputs of these components can be connected to other components in Simumatik.

To get started with Siemens PLCs in Simumatik I would recommend taking a look at:

Best regards,
Aron

Hi Aron,
thanks for answering my question. But sorry, I can’t see how to connect an output String variable of a component with a MW100 INTeger number of a S71500 PLC.
In the two lessons of the course you have suggested, there is nothing about how to link an internal PLC variable of type integer, stored in a word MW200 with an output variable of type String of a new component that I have generated.
I have read this lesson: Simumatik Academy - Courses - Adding Text Geometry To A Component,. It looks something like what I need but the input value must be linked to a PLC memory variable.
Can this task be done? in which lesson can appear the realization of this link?
Maybe is not possible for now
sorry for the inconvenience
Haritz

Hi Haritz,
Ah ok, if I understand correctly you want to be able to read the number at MW100 directly from the behavior of the text component you created? This is possible, it’s what makes all controller components able to receive a value from the PLC and write that value to an output port for example. The components that communicate with PLCs all have communication drivers that read and write to the PLC via the gateway. There is no course for creating components with drivers yet, sorry about that. However, since these components with drivers already exist you could also try an alternative solution. By adding an electric input port to the text component, you can connect the text component to a suitable controller in the system via that port. Then you will basically have the same setup as in the tutorial you mentioned, except the sensor will be switched for a PLC component. You could for example use one analog signal, or two digital signals where one increments the number and the other resets it.
Hope this helps! If there are more questions along the way, feel free to ask again.
Cheers,
Aron