Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting LabVIEW to Schneider Electric M258 Logic Controller (TM258LF42DT4L) Error - 1967353901

Solved!
Go to solution

I was wondering if anyone has ever connected this particular PLC to LabVIEW before. I'm trying to control various instruments conected to this PLC. This instruments are not NI, so they I havent been able to connected straight to the device via USB GPIB or VISA. Every time I try t connect following this NI tutorial (http://www.ni.com/tutorial/13911/en/), I receive an error at my shared variable.

 

Possible reasons: LabVIEW DSC: (Hex 0X8ABC8FD3) The modbus I/O server failed to connect to the Modbus Ethernet slave device. Ensure that the Modbus Ethernet slave device works properly and that the connection between the Modbus master and slave devices is configured correctly.

 

Any help on this approach or a suggestion for others would be greatly appreciated. 

NOTE: This PLC communicates with the CPU I'm using via a RS485 / RS232 serial port.

 

SAM

Download All
0 Kudos
Message 1 of 12
(8,982 Views)

Hi saraqu02,

 

Could you tell me what settings you selected on step 5, and what the ip address of your PLC is?

 

 

Tanner B.
Systems R&D Engineer - Aerospace, Defense, and Government
National Instruments
0 Kudos
Message 2 of 12
(8,912 Views)

Tanner!

 

I selected Modbus ethernet:

Address :1

Refresh rate(s): 1

Retry attempts: 4

Wait if fail(s): 5

Alarm priority: 8

Timeout delay (ms): 500

 

*I could find no concrete IP address for the sole PLC. However, listed on the outside of it was a EthMAC Address: 00-80-F4-40-34-1C*

The only definite IP address I have is that of the CPU I'm using to create the program. 

 

NOTE: The PLC is connected to COMPort1 through a RS232 serial connection. So I'm not sure if the model for modbus serial might be more appropriate.

0 Kudos
Message 3 of 12
(8,905 Views)

Ahhh... that's definitely the issue. You need to select Modbus Serial and match the settings to your device. You can find the settings in your user manual here, but I've listed what I believe them to be below:

Baud rate: 19.2 kbps

Parity: even

Stop bit: 1

Physical medium: RS-485 2-wire

Tanner B.
Systems R&D Engineer - Aerospace, Defense, and Government
National Instruments
0 Kudos
Message 4 of 12
(8,892 Views)

Your sugested settings were correct as I confirmed them in the manual. However, upon retrying to run a test, I encountered the same error. I think this may possibly be the way that the driver is configured. It's Configuration 1, viewed through a Schneider's driver managment system for serial communication, has the Baud rate set to 9.6 kbps, instead of 19.2 kbps. I have tried establishing the modbus serial communication using the 9.6 kbps setting in LabVIEW previously...to no success. Is there an inherent contradiction error between the device's settings and the way that it has been configured? I can create a new configuration, with the correct baud rate. 

Also, when creating a new I/O server in LabVIEW, there is not field for physical medium. I don't know if this makes any difference or not.

0 Kudos
Message 5 of 12
(8,860 Views)

The physical medium is implied by selecting serial in the configuration window, so that should be good. I'm not familiar with Scheider's software, but it seems likely to me that those settings would need to coorespond to your devices settings. I would start there now that you have the correct LV configuration set up.

Tanner B.
Systems R&D Engineer - Aerospace, Defense, and Government
National Instruments
0 Kudos
Message 6 of 12
(8,849 Views)

Unfortunately, this option is continuing to fail when tested through the LabVIEW tutorial. I have a few thoughts for consideration and your possible input. 

 

1) There is a driver managment application in this computer (pictures provided). In that managment software, there is a tab for "Modbus test", where I have the ability to choose several link parameters, chiefly the protocol. The only protocol that confirms a connection - when tested - is the "Modbus serial [1]". Being unfamiliar with this software, I click "start" and am prompted with the error of "invalid response" after approximately 5 seconds or so. Could there be more to the modbus test to assist in a reliable connection to LabVIEW?

 

2) It seems that the ethernet option is still viable given I'm able to obtain a proper IP address for the Modbus. I'm thinking the serial connection that is currently in place with the CPU is overriding any ethernet connection I would be trying to establish. So, shut down the connected CPU (also disconnecting the serial communication line from either just the CPU or from both the PLC and the CPU), and test the ethernet connection using by laptop (assuming that the given EthMAC address listed on the PLC would substitute as an IP address in the LabVIEW tutorial).

 

Any thoughts?

 

saraqu02

0 Kudos
Message 7 of 12
(8,830 Views)

 To clarify, are you unable to successfully connect to the PLC using their utility?

 

If that is the case, you need to work out communicating with the PLC through their utility first.

Tanner B.
Systems R&D Engineer - Aerospace, Defense, and Government
National Instruments
0 Kudos
Message 8 of 12
(8,821 Views)

Sorry about the lack of clarity. I am able to connect through the protocol of "Modbus Serial [1]" ( the system shows a connection through this protocol). It is only when the test is initiated that an error occurs. I'm at a loss of what next step to take to ensure the test executes properly since the correct configuration has been set.

0 Kudos
Message 9 of 12
(8,819 Views)
Solution
Accepted by saraqu02

Right, but if the device won't pass a communication test from it's native software then there isn't really a chance that LabVIEW will be able to communicate with it. I would contact Schneider and see if they can help you get it communicating with their software, then we can worry about communicating using LabVIEW.

Tanner B.
Systems R&D Engineer - Aerospace, Defense, and Government
National Instruments
0 Kudos
Message 10 of 12
(8,814 Views)