LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PLC Connectivity with lab Through TCP/IP or UDP

Hello Everyone, 

I am trying to connect PLC through TCP/IP or UDP can anyone help me in achieving this task. The PLC CPU is of LSIS company Model XGK-CPUS and has the ethernet module XGL-EFMT.

I am trying to perform some boolean control, read and write data for some analog inputs and outputs.

 If you have any relevant material or examples kindly share with me, Thanks in advance.

 

Please find the attachment, modules detail manuals.

Download All
0 Kudos
Message 1 of 16
(6,111 Views)

It sounds like what you need is to run Modbus over the TCP/IP connection.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 16
(6,076 Views)

Dear Mike, 

I don't wanted to use Modbus TCP, i just wanted to do my task on Ethernet IP (which can be useable for both TCP, UDP). 

0 Kudos
Message 3 of 16
(6,050 Views)

Hello Everyone,
I am trying to connect PLC through TCP/IP or UDP can anyone help me in achieving this task. The PLC CPU is of LSIS company Model XGK-CPUS and has the ethernet module XGL-EFMT.
I am trying to perform some boolean control, read and write data for some analog inputs and outputs.
 If you have any relevant material or examples kindly share with me, Thanks in advance.
 
I don't wanted to use Modbus TCP, i just wanted to do my task on Ethernet IP (which can be useable for both TCP, UDP).

0 Kudos
Message 4 of 16
(6,042 Views)

Hi Taufeey,

 

I don't wanted to use Modbus TCP, i just wanted to do my task on Ethernet IP

ModbusTCP is also based on "EthernetIP"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 16
(6,032 Views)

Dear GredW, 

You are right but in MODBUS/TCP we can only able to use TCP but cannot use UDP, that's why i am repeating my question again.

 

Modbus ------------------------> TCP/IP or RTU

While EthernetIP -----------------------------> TCP/IP or UDP 

0 Kudos
Message 6 of 16
(6,029 Views)

Hi Taufeey,

 

but cannot use UDP, that's why i am repeating my question again.

So does your device support UDP at all?

Does it make sense to stipulate "UDP" when you can get ready-to-use libraries supporting ModbusTCP?

What's your motivation to use UDP???

(Please don't create multiple threads for the same question…)

 

While EthernetIP -----------------------------> TCP/IP or UDP 

EthernetIP -> UDP/TCP/Modbus (!)

Don't forget Modbus (which uses TCP under the hood) and always provide the full picture!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 16
(6,026 Views)

GerdW,

 

EthernetIP in this context refers to the industrial protocol (bad choice of name IMO). It uses the CIP object model like Devicenet but over the TCP or UDP physical layers rather than over CAN.

 

Taufeey,

 

This can be done in LabVIEW, take a look here: http://sine.ni.com/nips/cds/view/p/lang/nl/nid/209676 

Its a toolkit that you can buy separately (although going back a few years (maybe 8.6) it was free as an NI LABS thing).

I haven't used it since then, so not sure how it has changed over the years.

 

Does you device even support Ethernet IP? I didn't see it mentioned in the FEnet manual.

 

 

0xDEAD

 

 

 

0 Kudos
Message 8 of 16
(6,004 Views)

This is an example that you could use as your base for ethernet/ip communication with Labview if you are using the toolkit. You would need to know your PLC ip address and tag name. I don't know if you have a toolkit or if you are trying to communicate in a different manner. Hope the VI helps.

Message 9 of 16
(5,994 Views)

As you know in TCP we want more reliable data without error but in UDP we do not care about error so thats the reason for using UDP.

0 Kudos
Message 10 of 16
(5,985 Views)