Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

When is Modbus.ini loaded and can you force to reload after?

To effectively complete the Modbus disable task with the modbus.ini file entry "SkipImmediatePoll=1" and a high poll-rate time and/or a poll value of false, I need to know when the modbus.ini settings are loaded, and whether I need to restart any process with modbus objects, modify any running modbus object, restart lookout....etc. Also, can I force a reload programmatically? (suggestions welcome)

Ed
0 Kudos
Message 1 of 8
(4,239 Views)


Hi Ed,

The INI file is read when the Modbus object is first created in memory. And this happens when a process which has such a Modbus object configured gets loaded. Staring and restarting a process would do the trick. I am pretty sure you do not have to restart Lookout itself.

And yes, you can programmatically load a process using the Loader object.

Hope this helps,

Khalid


0 Kudos
Message 2 of 8
(4,239 Views)
Just wanted to clarify: by "starting and restarting" I meant starting, as well as restarting a running process would enforce the INI setting.
0 Kudos
Message 3 of 8
(4,239 Views)
Khalid,
Are you sure? There is only one Modbus.ini file, however a whole bunch of separate processes could use the settings in that file. Will the modbus.ini file properly set settings for modbus_objects accross several process files? Can Modbus objects in separate,simultaneously running processes have the same tag name? If so, how would the modbus.ini file differentiate them? If I create a new modbus object in a running process, does the modbus.ini file get parsed again?

I would think the file would be parsed anytime there is a modification to ANY Modbus object, but that's just my crazy logic.

Can you verify the behavior please?

Best,
Ed
0 Kudos
Message 4 of 8
(4,239 Views)
Hi Ed,

To specify certain settings for only specific instances of the modbus driver object, list those settings under a different ini section for that particular object. For some examples, take a look at the following link.

The various Modbus objects will review the Modbus.ini file when the process is restarted.

Regards,

Kristi H
Applications Engineer
National Instruments
0 Kudos
Message 5 of 8
(4,239 Views)
One additional point. As Khalid said, you can load with a loader object. But to re-load you must unload with a loader object and then load with another loader object. Or else you will get an alarm stating that you are trying to load an app with the same name as one that is already running.
0 Kudos
Message 6 of 8
(4,239 Views)
Kristi,

Yes, that is why I'm asking if the file gets parsed at other times. Shouldn't those settings be reviewed anytime a Modbus object is modified as well as when a process containing the object is started?

Afterall, Lookout has great praise for it's ONLINE editing ability.

Thanks!
Ed
0 Kudos
Message 7 of 8
(4,239 Views)
Review/Clarification for all those interested.

I need a way to turn modbus device communication on and off within a running process, to avoid wasteful computer resources timing out on communication with disabled Modbus client devices.

So we can enable "skipimmediatePoll" for [Modbus_X] in the Modbus.ini file and then set a very long poll-rate on tag Modbus_X. This, so far is the best way to minimize the lag at process startup so that working devices get polled much sooner.

Why I ask if the Modbus.ini file is parsed whenever a Modbus object is modified, is to provide an easy method to turn the devices effectively on/off by just changing the poll-rate back to normal after editing the Modbus.ini file, all while the process remains running.

Of course it would be
nice if I could force the Lookout.ini reload without restarting processes, then I could reload the .ini file and dynamically change the poll-rate while the process remains running, effectively switching the client communications on/off when necessary. Even better, I could programmatically edit the .ini file, reload it (somehow) and modify the poll-rate, all within a running process.

Basically, I need a way to reload modbus.ini settings without reloading a process. Alternatively, I could just load/unload a dummy process programmaticaly. I just need to verify the behavior of the modbus.ini file settings and existing/new modbus objects created/modified, knowing exactly when the settings get loaded for sure. For example, say I load a dummy process with no modbus objects in it. Will the .ini still reload? Will it affect modbus objects in already running processes whether the dummy process has or has no modbus objects within it?

......

Thanks All for your interest and particip
ation.
Ed
0 Kudos
Message 8 of 8
(4,239 Views)