Visual Basic to DL06 using ASCII

Brian10

Member
Join Date
Dec 2007
Location
Boston
Posts
4
Hello All

Do any of you have experiance sending and receiving ASCII using
Visual Basic and Automation Directs DL06 via com ports.

I working on a project that requires me to do this. Sending and receiving ASCII is a first for me.

I would like to send simple (1)s or (0)s values directly to the memory locations and thereby turn indivisual bits on/off using a comparitive contact (greater than or equal to 1 = on less than
turns it off). Then send back simple (1)s or (0)s back to veiw the outputs status. I have read this sites tutorial and wonder if it is in this case required that I convert to HEX as everthing is (1)s and (0)s.

(At a latter time I will tackle analog outs and ins but for right now I would be happy to see an output light up via VB)

In addition How do you all like (or do you) Automation Directs PLCS?

As you can probably see I need some help with this.

Brian
 
Hi Brian,


Not sure if this will help but this is what I did some time ago, using an DL06 rs232 output, I use 485 now I was using one of my other names :) http://www.plctalk.net/qanda/showthread.php?t=28725

I know that the comms may not help but you can see how I broke down the string (with Bernie's help) and that may help

and to your other question about the AD plc's... I love them, you get a lot for the money and good support... but then again I get very good support here about every PLC under the sun :)

If you need the exact code let me know and I will post it when I get back to work
 
What version of VB are you using? If you are using VB 6.0, then use the MSComm ActiveX control. If you are using VB.Net, then invest is Visual Studio 2005. VB.Net VS 2003 will allow you to use the old MSComm control, but you have to include it in the application file as a wrapper which requires a lot of extra coding and configuration. VS 2005 includes the MSComm control as a standard control that you can drop into your application.

Regards
 
Download the manual DA-DNET-M from the Automation Direct website. It gives you enough information to write your own serial port driver for the DirectNET protocol. The protocol allows you to read or write data values to the PLC's memory.
 
Not to contradict you Steve but I have a different opinion on that.
I have written a DirectNet driver before and it's not the easiest thing in the world.
If using an 06, I would personally opt for writing a simple Modbus driver. The CRC calculation is harder but there are literally thousands of examples out there for free on how to do it.

Now if the possibility exists that you may have to port this application over to other CPUs like the 240 and 440 then what Steve said would be best because those CPUs are not Modbus capable, only DirectNet.
 

Similar Topics

Dear experts, I am want to program RS view32 with help of Microsoft visual basic (visual basic editor). But how to start I don't know,please...
Replies
10
Views
2,377
help How do I create Bidirectional Activex Connection Arrows? As per attached photo. How to Create RightoLeft Property in Visual Basic - Activex?
Replies
3
Views
1,657
I'm just trying to load from a text file into a string. I don't get why this doesn't work. Function LoadFile(FileName As String) As String()...
Replies
0
Views
1,548
Hello, Im trying to learn how to use VBA with factorytalk view so i can later design displays using tags from PLCs and im having some trouble...
Replies
2
Views
3,797
Hello there, world! The problem i'm facing up is about a registry I need to do in order to compare the set point versus the real variable I got...
Replies
2
Views
1,580
Back
Top Bottom