Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus Communication between Labview and PIC

Hello.


I need some help with Modbus protocol. My Dissertation is a SCADA system, connecting an emulator of photovoltaic panels (which is implemented with a PIC) and PC with labview 2011 playing the role of Master, with which you configure the PIC, getting value tables curves and / or references, number of panels, etc., and then all this real-time display different emulator output curves IV, PV, alarms, ....
I am using the libraries MB example Example MB serial master (legacy) and I can not know how or where you step format that I have values in a global variable.
I extructurado system as follows:
1. A main saw is responsible for starting all the Vi's, Visor, Modbus and registration.
2. All these values stored in global variables.

3. All is closed with main Vi.


So!! do not know how to send all that data to Mobus or how to organize arrays in global variables!!!
 
I would appreciate the help a lot. Thank you very much.


(zip password: modbus

 

attached the Vi's, the of log has nothing lol even when a problem is resolved then another)

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

Hi,

 

I took a quick look at your Modbus project and noticed the MB Serial Init VI is missing inputs.  Having

the correct serial settings for your Modbus network might improve your results.  The parity, data bits, and

stop bits need to be appropriate for your MB device.

 

If you have not already established communication between the PC and the Modbus device, you might

consider a more basic approach.  Using the MB Serial Init and MB Serial Master Query VI's, you could

create a simple VI to read registers on your device.  You could also utilize NI I/O Trace to monitor the

serial communication and verify that your MB query and reply messages are correctly formatted.

 

(I have seen similar suggestions in early discussion postings and found it worked for me).

 

Please provide some further details pertaining to your Modbus network to clarify your setup.  Identifying

your serial interface and type of Modbus network (eg: Modbus RTU over RS-485 two wire).  The proper

serial settings will depend upon your hardware/implementation.

 

Thank You,

gwjtstengr
0 Kudos
Message 2 of 2
(4,009 Views)