07-27-2009 05:06 AM
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
07-28-2009 04:31 PM
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
07-28-2009 04:34 PM
07-29-2009 02:07 AM - edited 07-29-2009 02:08 AM
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,
Olivier L. | Certified LabVIEW Developer
07-31-2009 05:28 PM
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
08-03-2009 05:03 AM
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,
Aurélien J.
National Instruments France
04-09-2010 01:58 AM
05-05-2010 05:32 PM
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?