02-08-2020 08:51 AM
Hi All,
I'm working on a project which involves a device that communicates over MODBUS TCP/IP. Everything works fine - no problems at all. However I'd like to package my worksheet to work on point-of-use systems through DASYLab runtime so that a user can do basic test configuration set-up and then just 'hit start'.
The issue is that I want to keep the worksheet general so that I can connect to any device (that is to say different IP address & identical MODBUS map). I've tried reading in global variables to set the IP address, but nothing seems to work. Does anyone have any ideas on how to integrate easy user entry of a device IP address when working through the Runtime?
-MW
Solved! Go to Solution.
02-10-2020 08:12 AM
When running DASYLab Runtime, you and your user may be able to make the TCP/IP address change for the session, but the worksheet will not be updated.
When the Worksheet first loads, it may show the Display view with the tree view of the worksheet. You can double-click on a module to change the properties.
At this time, there is no way to change the Com Port or TCP/IP address for the RS232 Input, ICOMS Input or the Modbus Input modules.
Options:
Move to OPC with an OPC server. If that's likely to be variable, use the Network-->Datasocket Import module because it can use Global strings for the TCP/IP address (the OPC Input module cannot).
Write your own function using the Script module. You would have to supply the Modbus library (a quick google shows several) to your end users. That could be part of the script configuration. With your own function you have control over how to enumerate the TCP/IP address -- from a global string, read from a file, etc.
02-15-2020 08:25 PM
Thank you for the input! I believe I have found a functional workaround!