Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control valves on a Festo CPX/MPA?

Hi, I want to write a program in LabVIEW that controls certain valves on a Festo controller of type CPX-FEC which has an MPA valve rack. It should be done through Modbus/TCP. I've found the Modbus library in the KnowledgeBase and looked at the examples.

When I run the Festo Modbus Example.vi I get the valves to turn on and immediately switch off. The on/off happens so fast that no air has time to pass through the valves.

 

My questions are:

*How can I change the example so that the valves are left "on" until I give another signal to turn them "off"? Or alternatively change it so that the valves are left "on" until a timer expires.

*In the example the different valves on the MPA are turned on by clicking the LED-button in the LabVIEW window. What determines which valve is connected to which button?

*The Festo Read and Write vi:s read and write to specific hard coded Modbus adresses, how are these connected to the different valves? Can I assigne a specific adress to a specific valve?

When the program is complete, I want to be able to run the valves independetly of the others in various sequences, i.e. Valve 1 should be turned on/off twice a minute for 5000 cycles and Valve 2 four times a minute for 100 000 cycles etc... Do you think this is hard to do? My experience with LabVIEW programming is very basic but constantly increasing! 🙂

 

J Fight

0 Kudos
Message 1 of 7
(7,832 Views)

Hi John,

 

did you find a solution to your problem meanwhile? If yes, I'd be glad to hear it.

 

Greetings,

Stefan

0 Kudos
Message 2 of 7
(7,662 Views)

Actually yes, the solution was to hire a consultant that with some hokus pokus took care of everything.

 

But really, the solution was to simply find what button in the modbus example was linked to which adress on the MPA/CPX. Then it was just a matter of implementing the example into my other code.

 

Johnny C

0 Kudos
Message 3 of 7
(7,657 Views)

Hi John,

 

it's me again. It seems you're the only who can help me. I want to build up a connection to an Festo CPX-FEC just like you did. I found the examples but can not make the work. I get the error "connection refused by the server.." and don't understant why. In my opinion, the VI server is properly configured. Did you perhaps deal with problem?

 

Thanks,

Stefan

0 Kudos
Message 4 of 7
(7,625 Views)

Well, IMHO.....plain TCP Communication would the best way to go.

 

I have worked with Modbus in the past, using the I/O Servers and also the modbus library (which has some bugs by the way)..after using the examples provided in the knowledge base.....I came to the conclusion that using standard TCP/IP Communication is the easies and best way to go, you have acces to all of the modules, also at a bit level, your app also runs way faster.

 

Hope someone replies to this, would be great to upload some VI's of the CPX used as a controller, not only as an I/O Module

0 Kudos
Message 5 of 7
(6,459 Views)

Hi regarding to the above...

 

Did someone use labview to automate a cpx as a motion controller?

 

Would be grateful if you share...

 

Thanks

 

A_A

0 Kudos
Message 6 of 7
(5,832 Views)

Hi John, could you share your code, I need to do exactly the same

0 Kudos
Message 7 of 7
(5,326 Views)