Open OriolFM opened 3 years ago
Hi @OriolFM, do you know if there's an update related to the PR you created? I mean if a new version has been released to have the chance to dynamically create both the endpoint and variables definition. It would be very useful! Please let me know. Thank you very much
There are currently Import/Export buttons that allow to define the variable list as a CSV text file, so that is better.
However, the variables are still defined in the endpoint, not in the S7 node, so you can't define the variables by passing them in the message.
In one of my current applications I have about 30 machines that are almost identical, and I'm reading 30~40 variables on each one.
Since the variables are tied to the endpoint definition and not the S7 node, If I just copy-paste the S7 node and change the IP address to the PLC i want to read from, I am changing the endpoint instead of the node, and then I get the same result from both S7 nodes, the one on the last PLC i edited.
Original procedure:
Current Workaround:
I don't know if there is a simpler option already done, but as it is, I see two possible solutions:
The first option I see would be to link the variable table to the S7 node instead of the endpoint. That way, we could copy/paste the node, and just create the new endpoint. All the variables that were configured would be kept. A potential problem would come up when a memory address does not exist for a specific variable. Then the node could either return an error or an "undefined", as usual in node-red.
The second option, that may be simpler to implement, would be to add a pair of IMPORT and EXPORT buttons for the variable tables. "Export" would copy the variable table into the clipboard, and "import" could open a text field where the whole variable table could be pasted. Changes like this might be minimal, but would allow for much faster deployment in projects where you have to replicate the same PLC structure for different devices.
I'm sorry for not having enough programming skills to contribute directly, but if I can help with more feedback, let me know.