LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP Communication to Festo Drive

Solved!
Go to solution

Hello,

 

here is what I have found:

Festo Modbus TCP Sample (C#) : Link_Festo_Search

Modbus on CMMP-AS- -M3/M0: Link_Festo_PDF

Manual of Festo Controller (see 4.3, page22...): Link_Festo_Manual

 

The C# application can be built as a .NET DLL and then beeing used in LabView 🙂

 

BR

EWiebe

-------------------------------------------------------------------
Eugen Wiebe
Bernstein AG
CLAD - Certified LabView Associate Developer
0 Kudos
Message 21 of 36
(3,507 Views)

@Gerd

You have written how to connect over TCP:

connect.png

 

Thanks !

 

But how to read over TCP? What should be here (red ellipse) ?

 

what_should_be_here.png

 

Thanks in advance and

BR

EWiebe

 

 

-------------------------------------------------------------------
Eugen Wiebe
Bernstein AG
CLAD - Certified LabView Associate Developer
0 Kudos
Message 22 of 36
(3,504 Views)

Hi Eugen,

 

as I read plain TCP messages (instead of using any of those Modbus libraries) this parsing routine receives the whole message and just parses the FHPP part in the message string...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO
0 Kudos
Message 23 of 36
(3,499 Views)

Here is my solution using NI Modbus Library:

see attached zip file containing LV14 project with FGV

 

 

you will need NI Modbus Library:

you_will_need.png

-------------------------------------------------------------------
Eugen Wiebe
Bernstein AG
CLAD - Certified LabView Associate Developer
Message 24 of 36
(3,472 Views)

Hello Eugen,

 

I'm looking for a solution to communicate (1 Labview Application) over Modbus TCP Communication to 

- 2 x Festo Drive CMMO 

2 x Festo CMMP-AS-C2-M3

 

I found your solution, that seems to be quite interesting. Concerning your Labview solution :

- is your solution working for both Festo-Types (CMMO & CMMP)

- will your solution also work in one Labview programm with 4 Modbus-Communication simultaneously

 

It would be nice if you could give me an answer, thanks in advance

 

-------------------------------------------------------------------

David Abel

ProNES GmbH

0 Kudos
Message 25 of 36
(3,381 Views)

Hello David,

if both controllers support FHPP, then both should communicate with this LabView driver.

For simultanious communication you should perhaps little bit modify this driver to have some parallel loops (while loops) if it is not fast enough with the FGV solution. If you need support, tell me.

 

BR

-------------------------------------------------------------------
Eugen Wiebe
Bernstein AG
CLAD - Certified LabView Associate Developer
0 Kudos
Message 26 of 36
(3,369 Views)

Hello Eugen,
I came across this discussion which, I think, will help me.
I specify that I never use labview.
So, I have to drive 4 axis in TCP / IP modbus. For that, I have to send commands to my 4 drivers (CMMP-AS-C5-11A-P3-M0).
For now, I only take care of one driver.
I saw in the folder "FestoModbusTCP_FHPP" something that looks a lot like the festo documentation from page 120:
https://www.festo.com/net/SupportPortal/Files/428408/CMMP-AS-M3_M0-C-HP_2015-12b_8046788g1.pdf

 

But, I do not know how to use it.

 

I can communicate with my driver using the modbus master provided by festo "Mobdus TCP Client". This means that my drive is well configured.
After entering the IP address, in CCON, I press B6 OPM1, B1 stop, B0 Enable. And in CPOS I press B0 HALT.

But in the VI you have joined, there is no B6 OPM1.

 

Can you enlighten me on the use of VI and subVI for my problem.

thanks in advance

0 Kudos
Message 27 of 36
(3,291 Views)

I have inserted a drop-down-box In LabView:

CCON.jpg

 

Betriebsart = Operating Mode

Satzselektion = Record Selection

Direktmode = Direct Mode

 

The documentation says (p.124) :

sel_op_mode.jpg

 

So it is included. (you can say: it is encoded 🙂  )

 

BR

E.Wiebe

 

-------------------------------------------------------------------
Eugen Wiebe
Bernstein AG
CLAD - Certified LabView Associate Developer
0 Kudos
Message 28 of 36
(3,286 Views)

Hello Eugen,


Thank you very much for this very fast return.


I use the VI "FGV Festo Worker Test", I enter the IP address of my driver. Then in "KconfigDriveParams" for each byte, I put the bit as when using "Modbus TCP Client". That is to say:
byte 1 (CCON): B0 ENABLE, B1 STOP and in Betriebsart it is in direct mode (Direkauftrag)
octet 2 (CPOS): B0 HALT
byte 3 (CDIR): B1 and B2 in Positionsbetrieb
Byte 4 (Saturday): 20% of the velocity
byte 5,6,7,8: Direkt_Sollwert1 = 50 and Direkt_Sollwert2 = 50
When I compile, nothing of this product. Then clicking on "KONFIG" an error appears (ERROR 538179) as shown on the attached pictures.

Driver does not react at all.

 

What is the use of "KONFIG" as well as "INIT" and "close".

 

Sorry if that sounds like simple questions but I'm doing a job for which I'm not qualified at all.

 

Thank you very much in advance

Download All
0 Kudos
Message 29 of 36
(3,277 Views)

I reinstall labview and the modbus library version 1.2.1.42. But there is always an error that appears, the communication modbus seems not to take place (error 56). Do you know where it can come from?


Thanks in advance

 

Hanane

0 Kudos
Message 30 of 36
(3,214 Views)