Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

RTU Modbus in Project Explorer

Hi, I am using LabView project editor to try to communicate in Modbus RTU protocol with 2 linked Emerson Motor Controllers. See attached screen-shots. Initially if Enable Aliasing button is not checked in shared variables an error indicates it is invalid for hexadecimal format: code: 1950679008 Reference: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/errors/shared-variable-error-codes.html However if Aliasing is unchecked labview runs but does not obtain any registry information. Any ideas?

Download All
0 Kudos
Message 1 of 20
(7,806 Views)

pictures attached

Download All
0 Kudos
Message 2 of 20
(7,805 Views)

Hey hg, 

 

My first thought was that you had configured the variable outside of an allowed range somehow: https://www.ni.com/docs/en-US/bundle/labview-datalogging-and-supervisory-control-module/page/lvmve/d...

 

However your pictures seem to indicate a valid range. I think the problem is within the labview project and is likely a configuration problem. I would remake the project and/or the IO Server and see if that fixes the problem. If it doesn't can you post your project or a project that reproduces the problem? 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 3 of 20
(7,791 Views)

My varriable range is using modbus address 42045 which translates to 402045 in labview.  See attached project.

Download All
0 Kudos
Message 4 of 20
(7,788 Views)

Hi,

 

Are you aware that, in many cases,  a DCS address 42045 is a Read register (4) at ModBus address 2044 ?

 

 

Kees

0 Kudos
Message 5 of 20
(7,763 Views)

Hi hg, 

 

I can't reproduce with your project. However, I don't understand why you mentioned hexadecimal in your first post, are you seeing error before you deploy? can you get screen shots of the error? 

 

 

You also might try binding to the psp address instead of the project variable or using programmatic access to the variable: https://www.ni.com/docs/en-US/bundle/labview/page/reading-and-writing-shared-variables-programmatica...

Jesse Dennis
Engineer
INTP
0 Kudos
Message 6 of 20
(7,761 Views)

Yes.  Decimal register 42045 is written as "....vi\Modbus1\402044"

0 Kudos
Message 7 of 20
(7,749 Views)

There is no error other than not accessing the register information.  I am unable to read or write to the registers.

0 Kudos
Message 8 of 20
(7,748 Views)

psp address does not apply for RTU serial communication.

 

Are there any other ideas or examples of using project explorer with RTU serial communication? 

 

0 Kudos
Message 9 of 20
(7,747 Views)

Hi hg, 

 

Good point on the psp address, I should have realized that. There is an example in the labview examples for the Modbus serial communication called modbus fundamentals that you will want to try.

 

 

Given I can't reproduce your problem I think the issue is with your installation of the dsc module a setting such as a firewall on your computer that is interfering with the DSC module. You may want to repair your installation of the dsc module and drop your firewall. If you weren't seeing a labview error I would think the problem was that the type of data being read from the register is not what labview is expecting. We can look into this further if needed. 

 

As a work-around there is another modbus library here that you can use:https://www.ni.com/en/support/downloads/tools-network/download.modbus-master.html

Jesse Dennis
Engineer
INTP
0 Kudos
Message 10 of 20
(7,730 Views)