Results 1 to 19 of 19

Thread: Industrial automation with network remote, please help

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Industrial automation with network remote, please help

    Hello,

    I am in the process of using Visual Basic 6 to automate a reef aquarium. The I/O is via PCI and USB controllers hooked to a local PC. I wish to be able to accomplish several things and need some help and advice. This project is way behind and I need help urgently.

    The program has to be very stable due to the fact that it will be running a reef aquarium. The code is basically a "game loop" style setup that uses variables read into memory from a DB and then acted upon by timers, Interupts from outside sensors, and pr-programed schedules. Data is also logged to the database at user setable intervals.

    Obviously the database is not queired for each loop iteration, as this would be insanley resource intensive.

    I would like the ability to:

    1) Control some aspects of the software via the web through a simple forms type of interface. EX turn outputs on or off.

    2) Gain detailed control of the software via en activeX dll over the web. EX more granular control of the software with much of the functionality of the Server side application.

    3) FTP or Telent into my application to control it via the command line.

    I have looked at winsock, but keep reading horror stories about it's stability. I have been told to use vb.net but don't have any idea what I would be using it for. I have played with the 2005 beta but use it as I would VB6 because I know no better. Using ASP to simply update values in the database is not going to work becuas the database is only queired when data is being logged.

    Any suggestions would be helpful.

    Regards,
    Bill
    Last edited by BeanAnimal; Feb 13th, 2006 at 02:43 AM.

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: Industrial automation with network remote, please help

    This sounds like some commercial software your trying to make, I suggest you post your project requirements on www.rentacoder.com and you can pay an expert to build your entire project (or any part of it). Usually the price is low depending on the project.

    I think this is the best option since you could have the project completed very soon.

    Chris
    Chris

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Re: Industrial automation with network remote, please help

    This is in NO WAY comercial software, it is for my aquarium. Thanks for the typical useless answer. Instead of answering some fairly basic questions about the direction of my project, you took it upon yourself to guess at the purpose and then shrug me off to a commercial software author. Typical of the interneternet these days. Ask a question and get a totaly unrelated authoritive answer that is useless to nobody.

    I did not ask you or anybody to author the software. I asked for opinions on how to accomplish my goals. In this regards, it does not matter if this is commercial or not anway. If you would have read and comprehended my qestion you would have understood that.

    Furthermore, this looks like a shameless commercial plug for a website or company that your affiliated with. Good grief.

    Kinda like dropping in to a DIY engine repair forum and asking how to change the timing belt on a Ford Commercial Duty van, and having BOB reply that "well since it's a commercial van and you may own a business, you should take it to a garage. While your at it my dad owns a garage near you." You never answered the question, or even addressed it, you simply went off on a tangent that is not helpful and certainly not in the context of the FORUM the question was posted in.

    Lastly, by replying to my post, you make it appear that my question has been resolved, making it less likely for others to even read the post. Thanks for the help buddy!

    Can anybody here answer my question please, as I would like to start building the basic layout of this software.


    Regards,
    Bill
    Last edited by BeanAnimal; Feb 13th, 2006 at 10:48 AM.

  4. #4
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: Industrial automation with network remote, please help

    Quote Originally Posted by BeanAnimal
    This is in NO WAY comercial software, it is for my aquarium. Thanks for the typical useless answer. Instead of answering some fairly basic questions about the direction of my project, you took it upon yourself to guess at the purpose and then shrug me off to a commercial software author. Typical of the interneternet these days.

    Can anybody here answer my question please.

    Regards,
    Bill
    You make me feel so wanted

    Its posts like that which will make people not want to answer your questions. Your post is vague, it seems you have just posted the requirements and expect someone to code it all for you.

    Even if its not a commerical project, you could get it completed for under $100 on rentacoder, in just a few days if you need it done fast. As i doubt anyone here will code the entire thing for you.

    Chris
    Chris

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Re: Industrial automation with network remote, please help

    No sir, it is people like you who make people not want to participate in forums. You reply was not helpful and not within the very context of this forum. You shrugged me off to a commercial coder instead of even attempting to answer my question.

    You have done it TWICE NOW!

    Quote Originally Posted by the182guy
    Even if its not a commerical project, you could get it completed for under $100 on rentacoder, in just a few days if you need it done fast. As i doubt anyone here will code the entire thing for you.
    You have replied and not answered my question and even interjected your own opinion again on my motives. I DON'T WANT ANYBODY TO WRITE THE CODE FOR ME. Please learn to read.

    My post is not vague.

    I want to add the ability to change parameters of a running program via a web interface. I want to be able to also do so via an ftp or telenet sesion. I want to know of VB6 or .NET is the way to go and what kind of structure I should be looking at. I stated that the "program" was already designed, but no the network interface to it. Hence I posted in this forum and not the VB6 or VB.NET forum.

    So please do me a favor, and leave my thread, as your wasting my time and certainly thwarting any chance of me getting help without reposting.
    Last edited by BeanAnimal; Feb 13th, 2006 at 10:57 AM.

  6. #6
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Industrial automation with network remote, please help

    *cowers into the thread*

    Since I don't know what you're connecting to the PC, just the means to do so; I can't really tell you how to read from them or send data through them. But since you seem to like shameless plugging so much ; you can check out http://www.opcfoundation.org/ for some utilities that might be able to help. All of our fans and tempetature controls here are controlled using an OPC server. It's worked for us, but I can't tell you if it will help your situation.

  7. #7

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Re: Industrial automation with network remote, please help

    Lets start over here guys... I will offer more information in hopes of getting some answers.

    I am fully capable of talking to and reading from my sensors via VB. I however need help adding the remote control capabilities to my application. The APP is in VB6, but I can port it to VB.NET. I am not sure which platform will make it easy to do what I wish with regards to the remote control of the app. Again it needs to be stable.

    So there is no confusion. The application is running on a PC attached to the sensors. The application is what controls the sensors (standard inustrial automation type of setup). I simlply want to be able to change paramaters from the web while out of town. The actual viewing of the data is simple becuase I can use simle ASP to poll the database. Again, the database is only written to during times when data is set to be logged. To read from the database every second or so looking for paramater changes pushed in from the web would be way to much load on the system and likely not stable.


    Bill

  8. #8
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Industrial automation with network remote, please help

    What kind of database are you using? You can set up a socket application in the computer with the DB and (assuming MS SQL) add a trigger to the table to fire off a console app that notifies connected users to re-query.

  9. #9

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Re: Industrial automation with network remote, please help

    Right now the CODE tha runs the aquarium is VB6. Startup data and system paramaters are stored in an ACCESS database. The app ues ADO/JET 4.0 to query the database for system paramaters at application startup. The database is then written to at set intervals. Things like temperatures, valve positions, light levels etc re all logged to a database.

    As I stated before, the LOCAL software is what controls the aquarium. It does so via a "game loop" type of architecture. Each loop looks at the timers, interupts buffers and other inputs to determine if outputs need to be turned on or off, or inputs need to be read or logged.

    I need to be able to change the operating paramaters of the system from the web. I am not concerned about forcing the web users to re-query at this point. The least of my worries is viewing streamed data from the application. Instead I simply need to control the application remotley.

    Example:
    I log in and notice that the temperature is 85 degress in the tank. I would like to be able to disable the output to the heater. This means that I have to change the boolHeaterRunning variable inside the application.

    Am I making sense or being confusing?

  10. #10
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Industrial automation with network remote, please help

    You're making sense, but the question might be too abstract for an easy answer. Since this is being done in VB6, from what I can remember; it's not too friendly when it comes to outside applications trying to change it (ie changing boolHeaterRunning). You might be better off utilizing the registry keys instead of variables for the values you want to change remotely.

    I'm not sure how you're planning on remoting into this. Are you wanting to use a web page or a remote application using sockets? It can most likely be done either way, but both will have hurdles. A webpage is going to be easier to connect to, but will have difficulties accessing and changing registry settings (you'd almost need to create another application locally for it to interface with to control the values). Socket programming would be the ideal solution as far as security goes, but depending on where you're connecting from; firewalls and proxys get to be a pain.

  11. #11

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Re: Industrial automation with network remote, please help

    If moving the application to .NET would make this easier or more stable, then I will do that. I however have no idea what to do once I port the basic app to VB.NET.

    I would like to eventually use both a web page and remote application via sockets. I had considered using regkeys to run the software, but was afraid that it would not be stable, or effieicent reading the registry so often.

    Is it possible to use the web interface to set the variables in the database via ASP and then somehow force the controll application to repoll the database? That would solve a lot of problems. Actual program parameter changes from the web would be rare, but needed.

    I am very interested in the sockets type of setup for a lot of reasons as well. On a side note: I would eventually like to move the logging database off of the system and store it on the network. This would allow the controller to be booted from a flash card and I would not have to worry about a HDD. I would not want to write log data to a flash card, due to the number write cycles.

    I could build the remote application to be much more ropbust than the web interface. Again, I have no idea where to start and if VB6 is OK to use, or I do I really need to be moving this to VB.NET

    I think we are getting somewhere. Thanks for trying to shed some light on this!

  12. #12
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Industrial automation with network remote, please help

    I can't really tell you the best way as far as VB6 vs .Net goes. It really is dependent on what you're more comfortable with. I myself am a .Net developer. I haven't used VB6 in over a year.

    It is deffinitely possible to use a table and control it through an ASP page, but getting the local application (the one with the db and such) to realize the table has changed can be an issue. Outside of repolling, it really won't know.

    Like I said before, sockets would be ideal; but they can get nasty. I have months that I've forced my memory to erase about using sockets in VB6. As far as your flash card idea, I lost you. I haven't a clue what you're trying to do there.

    If you have time, try and do it in VB.Net. It can't hurt. Since .Net is an OOP language (which VB6 is too, but .Net forces you into it that mentality); you can actually create objects and give them methods to do half the stuff you want. Not to mention, you can use the eventhandler also. I'm sure there's an argument to stay with VB6 as well, but like I said; I'm a .Net programmer. We only remember the bad things about VB6.

  13. #13

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Re: Industrial automation with network remote, please help

    Do you feel that VB.NET will produce an application that is as stable as VB6? I would imagine a sockets type of interface would be much more stable with .net as compared to winsock and somehwat easier to implement?

    With regards to an ASP page forcing the APP to poll the DB, could some sort of out of proccess DLL be used in conjuction with ASP?

    I have played with vb.net but the data controls threw me for a loop (no pun), as I am used to hard coding everything with DAO, ADO DSN-LESS connections. I just couldnt wrap my head around working withthe data controls and how they interoperate with the objects, as they are a lot different than the VB6 datacontrols like the datagrid.


    As a side note:
    The "flash card" will eventually be used in place of a hard drive. In otherwords the computer will boot from a compact flash card plugged into the IDE port. They however have a somewhat limited read/write cycle in the order of several hundred thousand writes per bit. In other words you don't want to use one as a swap drive (to slow anyway) or for a database that will get written to every few minutes 265 days a year.

  14. #14
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Industrial automation with network remote, please help

    Both are stable. VB.Net and sockets are a little easier IMO.

    I'm not an ASP developer. I learned all my ASP knowledge through ASP.Net (horrible and disgusting, but I got tossed into .Net web development against my will). I really couldn't tell you how much ASP is capable of.

    You still hardcode everything in VB.Net. Everything is ADO.Net and datasets. The code looks ALOT like ADO and recordsets. Techgnome has a good tutorial in his signature about ADO.Net. You aren't supposed to use the data controls (the ones in the design view); just the data objects. The tutorial can explain it alot better then I can. (also, the datagrid is still around in .Net. The functionality has changed though)

    Good luck on the whole flash card thing. I have no idea how you're planning on using that. The one thing I will say is that I'm pretty sure .Net requires it's own framework and alot of the windows APIs. I don't think that it will run independently of an OS.

  15. #15

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Re: Industrial automation with network remote, please help

    I will read the tutorial and then consider doing this all in VB.NET

    Can you point me in a direction for good client/server tutorials or information with regards to VB.NET and VS 2005?

    With regards to the flash card, it simply takes the place of the IDE drive. You copy the HDDs partition to the FLASH DRIVE and then use it as the HDD. They are not as fast, but silent and have no moving parts. Something that will help the stability of my setup. The same kind of setup is now popular in set top boxes where the OS simply runs the multimedia apps and the content comes from someplace else on the network.

    Bean

  16. #16
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Industrial automation with network remote, please help

    http://www.microsoft.com/events/seri...rnsoftdev.mspx

    Lots of great webcasts there. Check out the series at the bottom for client/server programming in VB.Net.

  17. #17

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Re: Industrial automation with network remote, please help

    Would writing my application and creating a "web service" for the application be something worht looking into?

  18. #18
    Addicted Member arunb's Avatar
    Join Date
    Jul 2005
    Posts
    131

    Thumbs up Re: Industrial automation with network remote, please help

    Hi,

    I just read your post on industrial automation system.
    I myself develop automation software for use in industries.
    regarding your project I have some advice to give you,

    1. Avoid using a computer for running life support system or a critical systems. You could instead use a standalone controller , that can be configured using a PC.

    2. If Web enabling is the issue , then you can stick to VB6 as it has all the controls required to do the job. In any case your application is quite simple and does not warrant a change of Programmig System.

    Coming back to your original post, you could use the Winsock control to web enable your application, in your case I think the UDP protocol would be quite satifactory. Please read the MSDN help on Winsock control, the demo example given in MSDN will make matters clear for you.

    By the way have you developed the code for controlling I/Os ??

    Thanks
    arun

  19. #19

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    13

    Re: Industrial automation with network remote, please help

    I have moved forward with a lot of aspects of this project.

    I had considered using an ATMEGA128 to do the work, and a PC to do the logging and paramters configuration. Alas, it is to much to learn and piece together.

    I have since decided not to use a "game loop" style polling setup, but rather numerous timers. Most of the outputs will be done though a 96 bit Nudaq I/O card. The inputs (digital and analog) will be through "phidgets" or "activewire" usb interface cards. I also plan on using several "dallas 1-wire" devices that will be polled via the USB port. The I/O code is stubbed and works, but I need to scale it to the application and build the interface.

    The system will not provide life support.... I just don't trust Microsoft and Intel to be stable enough to support my aquarium and don't have the time to learn to program a microcontroller.

    Thank you for your input.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width