From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically configure Modbus server.

Is it possible to programmatically configure an I/O server (e.g. Modbus Ethernet) in any way other than the Express VI provided with the DSC module? Many of the attributes are "hidden" in the dialog boxes, instead of being easily readable on the block diagram. Additionally, if I want to create a class encapsulating Modbus clients, there seems little ability to write accessors for attributes such as "maximum data points per command" or "first word low in 32-bit data types."

 

Any help/thoughts are appreciated. If the functionality doesn't exist, then I hereby submit a feature request.

0 Kudos
Message 1 of 4
(2,382 Views)

Greetings, Munsmat;

 

I do not think that there is any other way to configure a Modbus server without using the Express VI (Or configuring it directly in the project) that would not be creating the server manually. The most that I think would be possible is opening the front panel of the Express VI and attempting to make modifications therein. I will look around and double check, however.

 

I must ask, what are you attempting to do with the encapsulation of the client? I do not quite understand what you are interested in doing, and how you are interested in accessing those attributes.

 

Cordially;

Simon P.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(2,357 Views)

I'm learning how to use the Actor Framework to build an application for controlling, monitoring and aquiring data from a large research facility. One thought for creating a hardware abstraction layer is to have a generic "Modbus client" class. Modbus clients all share general characteristics, such as the attribute settings currently rolled up in the Express VI for creating and configuring I/O servers. Certainly, one can imagine setting up each client "by hand," but then you're not saving yourself any work. If you could handle full setup programmatically, then when a new Modbus client object is instantiated, the work load should be lessened. There's also the issue of transparency to someone creating a new object. Since you can't write accessor methods for advanced attributes, the only way to interact with those attributes is via the dialog box, which obscures how the client is configured and subsequently behaves.

 

Since I'm relatively new to the OOP stuff, it's possible that I'm overthinking the whole issue and making it harder than it needs to be. It still would be nice to be able to write a method to set the advanced attributes, instead of having to hunt through dialog boxes to find the options. I'm not generally a fan of Express VIs, because I'm often engaged in tasks that are beyond the functionality they provide and they obscure reading of code by failing to provide full disclosure about inputs and outputs.

0 Kudos
Message 3 of 4
(2,351 Views)

Greetings, Munsmat;

 

That is quite an interesting application. To be honest, I have never attempted to mix the Actor Framework with Modbus and the LabVIEW DSC Module to generate a Modbus client class. Still, it would seem that indeed the Express VI way will likely be the only way forward if you are interested in programmatically creating the servers. 

 

However, if you do open the front panel of the express VI you will have a few things that can be configured manually, but far from all the options; I do not think that there is a way of getting around this fact, however. 

 

Cordially;

Simon P.

National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(2,330 Views)