Results 1 to 7 of 7

Thread: My VB and stupid PLC ~

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Malaysia
    Posts
    12

    Smile

    Hi there, I need to write a VB application that able to communicate with PLC (Programmable Logic Control). The PLC will send a binary signal to my VB program. In my VB program, i used MSComm control and pick one of the PC Comm Port. My program just need to receive signal from PLC. The problem is, i don't know how to make my VB to communicate with the PLC. Is it any related with VB addressing or something? Hope that u guys can help me here...Thanks all!!!

    Regards, Jesse

  2. #2
    Guest
    Put some code into the OnComm Event of the MSCOMM control, that takes care of incoming data. Use MsComm1.Input to retrieve the data.

    I am interested in controlling something with the MSCOMM control, what do you use the logic thing for, and where did you get it?

    I cant seem to find anything that interfaces with a serial port, apart from my Palm IIIx and thats all gibberish!


  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Malaysia
    Posts
    12
    Hi, actually the PLC i mean is the PLC that sit inside the Production line, which my working place is hard disk drive factory. I am required to write a VB program to keep monitoring the machines inside production line, if something happened on production, then the PLC will perform it's task on it's certain On and Off stuff. So once PLC perform it's task it will manage to send the signal to my VB and my VB will display what kind of problem or error happened. I used RS232 as my serial port protocol...I know what you said by using the OnComm in MSComm control, but the problem is i am not sure about PLC, which i am not a Engineering Student, i even don't know how it will send signal to my VB, the only thing i know after do some Online testing with it, i just found that it send binary signal.Sigh....any idea regarding to this? ok see ya....

  4. #4
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    in my dealings with Proccess Control and such, it might be better to use the Inp() and Out() functions in VB. If you remember QBasic, it had these functions. There is an DLL Library out there with them. I found it, you should be able to. I don't remember where, do a search.

    hope this helps,
    gwdash

  5. #5
    Member
    Join Date
    Jul 2000
    Location
    Ontario, Canada
    Posts
    61
    If you know C++ it would make your work a lot easier
    ---~^ Absalom ^~---

    There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.

  6. #6
    Hyperactive Member dsy5's Avatar
    Join Date
    Jul 2000
    Location
    Lockport, NY
    Posts
    362
    Originally posted by Jesse
    Hi, actually the PLC i mean is the PLC that sit inside the Production line, which my working place is hard disk drive factory
    What kind of PLC are you using? Computer based or
    proprietary hardware?
    Donald Sy - VB (ab)user

  7. #7
    Hyperactive Member
    Join Date
    Jun 2000
    Posts
    350

    Inp & Out with VB

    Jesse-

    If you are still looking for a DLL to give Inp & Out like gwdash suggests a la QBasic, go to http://www.lvr.com and you'll find an exact replica of QB's functions.

    Now this may sound like a silly question, perhaps even rude?, but have you read your PLC's documentation or gone to the maker's web site? If it's one of the better known makers, they may well have some Application Notes available.

    I've got no PLC experience, but know someone who has: why not email (or post in the forum) the PLC's make and model?

    Good Luck-

    Jim Brown,
    Johannesburg, South Africa
    [email protected]

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