r/visualbasic • u/[deleted] • Sep 26 '18
VB 5.0 modern equivalent?
I help manage a number of machines in a manufacturing plant that use VB 5.0 for the user interface and some basic PLC communications. As I'm sure you can imagine, our computers are old. So, I'm trying to sort out what we need to get the system updated. Are there any drop-in programs that will work with a modern computer and read the code as originally written? Or is VB 5.0 so out-dated that the whole thing will either need to be heavily modified or completely rewritten?
I was thinking I'd bring in some Raspberry Pi's and throw on whatever software is needed to run the code and leave it at that. That said, I'm not that knowledgeable of computers and am open to suggestions. Thanks in advance!
2
u/AnonymooseRedditor Sep 26 '18
I have some experience in this space. The problem I think you will find isn't so much getting the software to run on modern hardware, it is the interface to the PLC / industrial equipment. I had one piece of machinery that had 2 full length 16bit ISA cards that required a special motherboard to be able to upgrade the machine.
1
Oct 15 '18
Good advise, thanks! Pretty sure it was a standard ethernet/RS-232 connection, but I'll need to crack open the machine to double-check.
6
u/JakDrako Sep 26 '18
VB5 an VB6 programs still run fine (mostly, I'm sure some exotic OCXs might be problematic) on modern PCs running Windows 10. Windows has a rather formidable 32-bit emulation layer (Windows on Windows, or "WOW") that lets you run old 32-bit apps pretty mich transparently. The only thing is that the OCXs and DLLs required by the app have to be installed and registered in the \SysWOW folder. Similarly, if you need ODBC configuration, you have to use the ODBCAD32.EXE that resides in the \SysWOW folder, as the one in System32 is 64 bit (yes, it's confusing...)
Source: Maintain half a dozen VB6 apps for my employer. They've run on every Windows version since Win 2000 (XP, Vista, Win7, Win8 (ugh) and Win10...)
1
u/1point44mb_is_fine Sep 27 '18
I've dealt with this - if I didn't have the code for the original system I turned the (in this case) the Win95 machine into a VM and it's been running fine for an extremely long time. Things I had source code for I just re-wrote in C#. If you're dependent on an old OCX for this or that maybe there's a new version available from the vendor.
1
Oct 15 '18
I'll have to dig some more, I'm not sure what this program uses. I know the code uses Microsoft Access - is that what you're referring to? I'm a complete noob and just trying to sort together a recommendation for how to move forward.
2
u/1point44mb_is_fine Oct 15 '18
I'd suggest that (although I like the idea) that the Pi's are out if you have to use MSAccess. If it's using RS232 or RS485 or whatever then yeah download the free P2V (Physical to Virtual) converter from VMWare and then you can use VMWare or VirtualBox to give it a try - doesn't cost you anything other then a few hours to see if it will work :-)
1
5
u/ViperSRT3g Application Specialist Sep 26 '18
"Simplest" update I can think of would be to update the machines running the apps, and use a VM to host the older OS and the PLC apps. Otherwise you'll need to contact the manufacturer of the PLC applications to see what they offer with updated software, and updating older versions.