PDA

Click to See Complete Forum and Search --> : is this possible????


ymcorp
Jan 9th, 2008, 01:09 PM
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.

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

ymcorp
Jan 11th, 2008, 07:23 AM
anyone? :afrog:

ymcorp
Feb 6th, 2008, 09:14 AM
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

Shaggy Hiker
Feb 7th, 2008, 09:04 AM
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.

ymcorp
Feb 12th, 2008, 08:25 AM
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

jpalm
Mar 14th, 2008, 03:57 PM
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

ymcorp
Apr 3rd, 2008, 07:10 AM
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 :D

arj3090
Aug 16th, 2008, 09:04 AM
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