LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW WE LINK SHARED VARIABLE WITH DEVICE ADRESSE (MODBUS SENSOR ADRESS ) IN I/O SERVER MODBUS

Solved!
Go to solution

Hi Jim,

 

Is your first example, with MB library, well communicating with your device?

 

From the configuration point of view, everything you have to take care is the device adress (slave adress), the baud rate and other properties of the serial communication, and that you use the good cable. Then, verifiy that you created your variables to the good modBus registers you want to read.

 

In order to get errors showing us something wrong, you should drag the variable into the diagram instead of the front panel, and wiring the variable to a control or an indicator. Then, the automatic error handling of LabVIEW should display the errors appearing.

 

Please let me know,

Olivier L. | Certified LabVIEW Developer


0 Kudos
Message 11 of 18
(1,225 Views)

Oliever,

 

Thank you for the further reply.

 

Yes, the attached vi can communicate well with my slave device with no problem. 

 

From my slave device mannual (ABB ACS550), 40103 is to read one of the holding register.  I created a new I/O server under the project explorier and select Modbus instead of Modbus slave.  I configured the Modbus I/O server to the corresponding slave address, created bund variables, and drag the variables to the diagram .  connected to a indicator and error indicator.  Then I  got the error code:-1950679035 . 

I wonder does the shared variable need to specify the function code or something like that?  Or do I need to connect the shared variable with some process in the main vi I attached?  Thank you.

 

Jim

0 Kudos
Message 12 of 18
(1,211 Views)

Hi Jim,

 

Would you like to have a look at this document : Error -1950679035 when Using Shared Variables

It explains that the error could come from a problem with Firewall.

 

Please, test changing these parameters, and let us know about your results.

 

Cheers,

Message Edité par Olivier L le 07-29-2009 02:08 AM

Olivier L. | Certified LabVIEW Developer


0 Kudos
Message 14 of 18
(1,191 Views)

Hi Oliever,

 

Thank you for the reply.  I tried turned off my firewall and change the parameters, deploy the variables.  Then I got a new error code: -1967353900, which state "The Modbus I/O server failed to allocate a serial port for the Modbus slave device".    The serial port I assigned in the "Configure Modbus I/O server" window is the same as I used in the Modbus liberary vi.  And the liberary vi can work with the serial port.  Is there any missing step ?  Thank you.

 

Jim

0 Kudos
Message 15 of 18
(1,167 Views)

Hi,

 

I advise you to read this document: Troubleshooting Modbus I/O Servers

You maybe have an other application running on the serial port. if you use USB/serial port device, try to reset it.

 

Regards,

0 Kudos
Message 16 of 18
(1,150 Views)
Hi. I tried with the troubleshooting listed on the link you sent but nothing. NO other program is running and I am still getting the same error code. I have checked with the measurement module about the port and it is working properly. Any other idea?
0 Kudos
Message 17 of 18
(1,015 Views)

I am with the same problem. See in http://forums.ni.com/ni/board/message?board.id=170&message.id=494104

 

Anyone has already got to communicate a PC and an external device using the Modbus serial server?

David Fiorillo
0 Kudos
Message 18 of 18
(939 Views)