LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

:Labview for control

( What follows could be highly subjective and a personal viewpoint, possibly due to lack of clarity. Please bear with me and give your views in reply...)

The query is simple ....

How effective is LabVIEW as a replacement for a PLC to control a machine with about 20 DI, 14 DO , 3 AO and 9 AI ?

I have been doing similiar such control applications for the last 4 years starting with LV7.1 and now on to LV8.0. But as the machine control demands increase in complexity, the wiring really become quite complex. I normally follow a State Machine model within a 50mS timed loop. ( The timing is never deterministic and that is another issue ...)

As far as I have realized, LV is great for data acquistion and analysis but quite "weak" when it comes to full control of a  machine  which is a breeze for a low level PLC. WIth LV the following are major set backs as per me :

- Documentation of all the graphic code is very, very  difficult if not impossible. Thus offline study of code from a printed copy ( like we do in C ) is not easy.
- Nested structures are a big pain to troubleshoot and debug.
- As the control complexity increases, wiring becomes a nightmare.
- Even with the best of intentions and  efforts,  presenting a  neat  wiring  with comments  is a pipe dream for complex controls...
- When working with sub panels, setting break points  and single stepping  are almost a joke.. particularly with time critical  functions.

I just would like to know if I am making a mistake in trying to use LV for complex control applications ????

Thanks for your time ( and kind replies..)

Raghunathan

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 8
(5,564 Views)
 

Raghunathan,

 

 

I would look at the M-Series cards for you application: http://www.ni.com/dataacquisition/mseries.htm.  For straight control with no analysis maybe a PLC is a better choice because of cost.  For any real analysis LabVIEW would be the choice.

 

 

For deterministic you should be using LV RealTime if timing is critical.  It is not LV's fault and is a function of the operating system.  LV RT: https://www.ni.com/en-us/shop/product/labview-real-time-module.html.  I find LV to work quite well and maybe a function on how you have your code structured.

 

 

LV's strong point is analysis and is MUCH better than anything you will find in the PLC software. 
- Documentation of all the graphic code is very, very  difficult if not impossible. Thus offline study of code from a printed copy ( like we do in C ) is not easy.

 

 

Solution: Experience.  LV code properly written is very easy to read, analyze, and review.  If you make a hair-ball out of the code then yup, can't read it.

 

 


- Nested structures are a big pain to troubleshoot and debug.

 

 

Solution: Use more subroutines and limit nesting to at most 3 or 4 levels..  LV has excellent debugging capabilities far beyond any other programming languages

 

 


- As the control complexity increases, wiring becomes a nightmare.

 

 

Solution: See hair-ball above 😉

 

 


- Even with the best of intentions and  efforts,  presenting a  neat  wiring  with comments  is a pipe dream for complex controls...
- When working with sub panels, setting break points  and single stepping  are almost a joke.. particularly with time critical  functions.

 

 

Solution: Strong Disagree, anyone can use any software package and make a mess.  Take a NI class or two, watch some WEB videos on NI's site, and give it a chance.  Experience is the only solution for your problem.  Hire a certified developer to work with you and you will see the light.  I have created code in LabVIEW to control submersible cutters, smoke chambers, multiple DAQ applications, Robotic Controlled Laser Measurement Systems, and detailed analysis of parts in conjunction with a PLC when it was far beyond the abilities of the PLC to analyze the data.  LabVIEW is up for the task and can take anything I throw at it.

 

 

www.ni.com/training

http://sine.ni.com/apps/we/nievn.ni?action=display_weod_main 

Too many resources to list.

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 8
(5,562 Views)
Hi Mathew,

I agree with everything of what you wrote.

I also would like to confirm that I have NOT  reached the pinnacle  in terms of LV coding efficiency. Really long way to go there. And hence I am not qualified to comment on it as a language - what I asked was aimed at getting a general opinion on the instances where LV was deployed for control functions.

To make my query more clear, let me eloborate :

If there is a machine with following requirements :

- Handle some 10 user push buttons / switches.
- Read in some 28 field level digital sensors like fluid level, limit switches, proximity switches, safety doors etc.
- Control about 14 solenoid valves based on the above inputs .
- Read in some 7 analog channels and plot / save the values.
- Generate 0-10V command signals for  motor rpm  and  system pressure.
- Generate reports after each test and print it.

Obviously the last three functions are childs play for LV and maybe if I need deterministic timing, then a LV  FPGA module and suitable hardware can be selected.

But what about the first three functions ? Is LV still the choice ??

( The application that I cited above is a real one and most other applications will be similiar. I normally use  the M series  PCI cards. )

Thanks

Raghunathan


Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 3 of 8
(5,517 Views)


@Raghunathan wrote:

To make my query more clear, let me eloborate :

If there is a machine with following requirements :

- Handle some 10 user push buttons / switches.
- Read in some 28 field level digital sensors like fluid level, limit switches, proximity switches, safety doors etc.
- Control about 14 solenoid valves based on the above inputs .
- Read in some 7 analog channels and plot / save the values.
- Generate 0-10V command signals for  motor rpm  and  system pressure.
- Generate reports after each test and print it.


I'm currently working on something not dissimilar in terms of equipment (although there is more I/O) and we're using cFP-180x (which is only a remote I/O module). If we needed it to be more RT, we could basically take the control code and download it to a cFP-2xxx (although it might have to be adapted). These are expensive compared to PLCs, but they are more powerful and they run LV. We have done similar systems in the past (with more and less I/O and with various combinations of PLCs and FPs) and LV can definitely handle it, just as long as you don't need too much speed and that you accept that you are running on a non-RT system which could theoretically fail.

As Matt suggested, writing a complex program in LV is no different from writing a complex program in C or ladder logic - it's just that you would get farther without training because LV is more forgiving. The key at these level is to optimize - you have to know how to avoid LV allocating more memory than you like and how you can make it faster. This is all assuming that you are allowing your machine to potentially fail and miss sometimes, because even though XP is reliable when it's clean, it could still get stuck. If the machine can absolutely never fail, you need to go RT.


___________________
Try to take over the world!
0 Kudos
Message 4 of 8
(5,506 Views)
Maybe the state diagram toolkit would help. Is there an option with this to have parallel independent state diagrams running at the same time??
0 Kudos
Message 5 of 8
(5,441 Views)


@unclebump wrote:
Maybe the state diagram toolkit would help. Is there an option with this to have parallel independent state diagrams running at the same time??

That would require two VI's you can't have two SDs with the State Diagram in one VI.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 8
(5,363 Views)

Raghunathan,

One nice thing about NI and lab is you have many options.  Choosing the right solution depends on several factors:

- Is this going to be running for months / years at a time?  If yes, then consider a Real-Time solution  Windows good for a few months then needs a reboot.

- What is the sampling speed needed?  Microseconds, milliseconds, seconds?

Slow but easy: FieldPoint using Ethernet or DAQ Card to lab running on a Windows OS

Faster but more complex: FieldPoint using a Real-Time controller but need lab Real-Time

Fastest but most complex: cRIO running Real-Time but needs lab FPGA & lab Real-Time

If you want monitor and control of Real-Time application then you need to create a lab application running on a PC

Solution: National Instruments provides many choices at price and performance levels that you just can't find in a PLC system

 

Ton,

You can hve more than ore if you disconnect from the state editor.

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 7 of 8
(5,325 Views)

Translation to English....

Ton,

You can have more than one State Diagram if you disconnect from the state editor.  Recommend technique is to build up the two individual state diagrams individually then copy the cde into the main application.

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 8 of 8
(5,283 Views)