Results 1 to 8 of 8

Thread: is this possible????

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    7

    is this possible????

    well let me start off and explain what i am doing. for anyone that is familiar with "XL Reporter" you may be of some help. ok i have a button that when it is clicked it goes through this process of running a schedule and connecting through rslinx. so on my spreadsheet where the button is located i have used a data management function to send a number that i have in a cell. so when the button is pressed, it really runs the data management function and exports my desired cell (containing a number) to rslinx which is recieved by the plc. here is the button code if u are curious.

    Code:
    Private Declare Function XLRrequest Lib "XLRexcel" (ByVal s As String) As Integer
    
    eet '" + GetBookSheet + "'"Private Sub pbWriteToTag_Click()
    Dim s As String
        s = "UpdateSh"
        XLRrequest s
    End Sub
    
    Private Function GetBookSheet() As String
    Dim i As Integer
    
        ' Get the current wb name
        GetBookSheet = ActiveWorkbook.Name
        
        ' strip off xls at the end
        i = InStr(1, GetBookSheet, ".xls")
        GetBookSheet = Left(GetBookSheet, i)
        
        ' Add the current ws name
        GetBookSheet = GetBookSheet + ActiveSheet.Name
        
    End Function
    ok so hopefully you get what is going on there. now this is a very combersum approach to what really needs to do and is not very user friendly. i am just learning vb so i do not know to much about it.
    Now what i really want to do is to have a button in my vb program so that when a user clicks it, it will lets say turn on a light. so what needs to happen is when that button is clicked it ultimately will connect to rslinx and be able to write a number to the plc. i have rslinx installed (yes the non lite vs.) so i am wondering if there is a way to do this w/o having to go through another program of some sort

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    7

    Re: is this possible????

    anyone?

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    7

    Re: is this possible????

    does anyone get the drift of what i have explained? If Not i will try again, so here we go. i am creating a very simple application that will need to be able to write, and read from a plc through RSlinx Classic OEM. well i spose it doesnt have to be rslinx, if somone knows a different program that is cheaper and will still do the same functionality any suggestions would be great. as most of us know rslinx is a little pricey imo. and if it is possible is there a way to read/write to a plc w/o a 3rd party program that would be great. either some code or a good tutorial would be nice, i have found any tutorials that are helpfull. So Long story short what is the best way to communicate with a plc with VB2008. thanks in advance

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: is this possible????

    Sounds like a pretty specific hardware related question. Frankly, I'm not even sure what the acronym PLC stands for. However, the answer is generally this: Whatever communication protocol that the PLC handles, so long as it is fairly common, is probably available in VS. If the only communication protocol is proprietary, then you'd need some kind of API.
    My usual boring signature: Nothing

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    7

    Re: is this possible????

    PLC (programable logic controler) it is a "Micro Logix 1100. i am not exactly sure of what or where to even begin with this, if possible i would like to give the 3rd party application idea the boot, i just dont see the point of spending $1000 for something that is going to be used very little. just trying to figure out how to connect to the plc, and read and write from a tag, lets say from
    N10:0 to N10:10. i'm sure this is not an easy task, which is why rslinx and other applications are somewhat pricy. any other input is greatly appreciated

  6. #6
    New Member
    Join Date
    Mar 2008
    Posts
    1

    Re: is this possible????

    You are correct ... it is not easy to write to a PLC without using Linx. I have done some programming using VB through Linx using either DDE or OPC, but its not a clean solution.

    I now use an ingear driver. It is a class that can be accessed directly through Visual Studio and talk directly to AB PLC's without XLReporter and without Linx. Not bad for around $300.


    I have the $1000 developer version, and write custom HMI applications in VS2005 all of the time. No issues as of yet .....

    download a free eval version from www.ingeardrivers.com

  7. #7

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    7

    Re: is this possible????

    Thankyou very much for the reply, this is something I somewhat had in mind. I will have to look into this a little bit more, but for $300 i dont think you cant really go wrong. Appreciate the feedback

  8. #8
    Junior Member
    Join Date
    Aug 2008
    Posts
    24

    Re: is this possible????

    This thread is old, but for future reference, there are some open source drivers that communicate to micrologix and SLC. They can be found on sourceforge.net by searching DF1:

    http://sourceforge.net/projects/abdf1/

    This driver actually has more capabilities that the commercial ones. There is also one that reads data from a SLC 5/05 over Ethernet

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