PLC Serial Communications - Linux - Visual Basic -

D

Thread Starter

Dan

Can Visual Basic applications that communicate via the serial port with a PLC be run reliably under Linux?

Thank you for your time and expertise.
 
Dan:

The short answer is no. Visual Basic programs (or any Windows based program regardless of the language it is written in) usually can not run under Linux (yeah, I know about JAVA and PERL - even those have to be carefully examined if they are accessing hardware). The methodology of accessing hardware devices is completely different between the two.

As for reliability, that is a matter of the quality of the code you use. If your code has a bunch of memory and/or resource leaks, the OS isn't going to help you. If your code sets a device into an invalid state, the OS isn't going
to help you (and may just crash as a result).

If you are concerned about reliability, then Linux deserves a good look.

That said, if you require some temporary expertise in porting (or writing) code that will work under Linux, please feel free to look me up.

Ron Gage - an unemployed Linux Programmer and Electrical Engineer
Resume at http://www.rongage.org/resume.doc
 
G

Gilles Allard

Good news and bad news

Good first: yes you can do reliable serial communication under Linux

Bad news: VB is a proprietary language used only on MS-Windows. I'm not aware of any compiler/interpreter that would run natively
under Linux. It may run with emulation such as Wine but I generally stay away from this approach since I do not want to import in Linux the problems of Windows.

Depending on the complexity of your VB application, it may be easy to convert it to C or Kylix.

Don't despair
 
J
Visual Basic programs of any sort will not run on Linux. Serial comm or otherwise.

Visual Basic is a Windows language only.

If it is an option, try working with one of the more portable languages, such as Java or Python, both of which can run under both Windows and
Linux. Depending on your situation, though, that may not be an option at this stage. Future reference tho........

--Joe Jansen
 
A

Andrew Rokicki

You know your are asking for it. I get a feeling this will be one of these threads that does not end. Anyway.

We use both VB and Linux (hopefully all Linux in the future). Applications communicate to serial devices etc. Linux is more robust and flexible but more difficult to use. VB is easy to use but you get into the black box syndrome where you can only do what you are allowed to do not to mention all the licenses issues. Also in case of a system crash you can recuperate from hardware failure quickly with Linux. For example you can run Linux from a floppy or a flash disk. And if program gets wiped out all you have to do is stick new disk in. With VB if hard drive crashes(and it will) you have to reload the whole operating system with all the add-ons that you might have.

And let me put it this way. If airplane 1 was controlled with VB or PLC-VB, and airplane 2 was controlled with Linux. I would not let my kids fly on airplane 1 and I would not get on it. I would not let my kids fly on airplane 2, but I would fly on it.

OK now. let the beatings begin.
 
There are a couple of projects with the goal of bringing VB-like environments to Linux.

Two examples:
KBasic - www.kbasic.org
Phoenix Open Basic - www.janus-software.com

Google up "VB for Linux" and you can probably find more of them. The real question is -- Why would you want to do such a thing? VB is designed to be used under M$-Windows, not Linux.
 
H

Higginbotham Ricky

There is some support for VB.NET apps with mono. Its still bleeding edge software, but I thought I would mention. For those of you who don't know
mono is a linux port of .NET. I don't personally like VB, but have seen some screen shots of VB.NET running on a linux box using the gtk# for
windowing. I should probably repeat that its VB.NET and not VB and is bleeding edge stuff.

www.go-mono.com

Also mono will run under windows or Linux, I've run simple stuff on my home computer without problems but don't have any apps large enough to give you a good opinion on how far along they are and how far they have to go.

Richard Higginbotham
(speaking for me)
 
sir,
then how can I develop an application with GUI features and with Networking capacity in Linux or in Unix. Please let me know.
Thanks.
 
P

PLC-programmer

Perhaps you better take a look on the website www.beckhoff.de
This company sells a soft-PLC that runs in a layer under windows, which manages processor dedication. They even have combined units PC-PLC in one housing (CX100). This is a very stable, easy to program environment which is for example used in volvo-assembly factories (over 200 units) for critical automation.
These PLC's communicate over tcp/ip, modbus, canbus, profibus, RS232, RS485, ..... and they have a lot of ready to use vb.net (and c#) programming examples and libraries.
You really ought to take a look.
Even me myself being a linux addept, I started liking to work with dotnet on these systems
 
Top