DF1 Driver

saucekorn69

Member
Join Date
Mar 2005
Location
Quebec
Posts
27
Hi everyone,

I'm currently writing a driver under VB.NET in order to communicate with a AB ML1500. I can perform read/write using three adress fields without any problems, but I found this morning that my PLC is no longer communicating when I have restarted my computer. I have to start Rslinx which send an unknow command or control word that enables communication.

My question is: Does anyone know what's the first command or control word do I have to send ? Do I have to send only an initialize memory command ?

Thanks in advance !!

Best regards.

Nicolas Chaillou.
 
Last edited:
Nicolas,

Rockwell knowledgebase note G16610 - "DeviceNet 1761-net-dni and the i/o connection"

explains how to use "protected type logical reads/writes with two address fileds"

Good luck

Jiri
 
Hi Jiri

Cheeky question, are you working on a ethernet driver for us primative types yet?
icon10.gif
 
Jiri,

I don't understand what that knowledgebase note has to do with the problem that Nicolas is seeing? Are there issues with using the read/write 3 address field function with the MicroLogix?

I am not disagreeing with you, I just don't understand. That knowledgebase note seems only pertinent to someone writing DF1 commands to a NET DNI.
 
The problem revolves around the issue of Micrologix 1500 not being able to accept 3 address field protected type logical writes. It will do reads for some unknown reason. He needs to use the 2 address field protected type logical write. The app note pertains to 1761-net-dni module but within it there is a decsription of how
the two address field addressing works.
Why AB has not updated the DF1 manual is beyond me.
There are other issues that are not addressed within the manual.
One of them is an issue of embedded responses.
 
still having the same problem

Hi Jiri,

Thanks for the usefull link, no offense but I can write using three adress fields, bit tables, float tables, output tables...

I just test it by curiosity and it works !!! But I'm still having the same problem, PLC only send me back 0 whatever the command I send. I supposed I had to initialize communication by sending a specific command... Can a inapropriate baudate be the ause of this problem ?

Here is my code :

buffer = Chr(&H10) ' DLE
buffer += Chr(&H2) ' STX

buffer += Chr(&H1) ' Destination node
oCRC16.Add_Data(&H1)

buffer += Chr(&H0) ' Source node
oCRC16.Add_Data(&H0)


buffer += Chr(&HF) ' Command value
oCRC16.Add_Data(&HF)

buffer += Chr(&H0) ' STS
oCRC16.Add_Data(&H0)

buffer += Chr(iTNS) ' TNS most significative byte
oCRC16.Add_Data(iTNS)

buffer += Chr(&H0) ' TNS less significative byte
oCRC16.Add_Data(&H0)


buffer += Chr(&HAA) ' Function command
oCRC16.Add_Data(&HAA)

buffer += Chr(&H2) ' Byte size
oCRC16.Add_Data(&H2)

buffer += Chr(&H0) ' File number
oCRC16.Add_Data(&H0)

buffer += Chr(&H8B) ' File type
oCRC16.Add_Data(&H8B)

buffer += Chr(&H0) ' element number
oCRC16.Add_Data(&H0)

buffer += Chr(&H0) ' subelement number
oCRC16.Add_Data(&H0)

buffer += Chr(0) ' Low byte Value
oCRC16.Add_Data(0)

buffer += Chr(&H0) ' high Byte value
oCRC16.Add_Data(&H0)

buffer += Chr(&H10) ' DLE

buffer += Chr(&H3) ' ETX
oCRC16.Add_Data(&H3)

oCRC16.GetCRCResult(bLeft, bRight)

buffer += Chr(bLeft)
buffer += Chr(bRight)


Thanks in advance !!

Best regards.

Nicolas Chaillou.
 
Your commands look good to me (assuming CRC is correct). Jiri may see something I don't see.

So you are saying that this command will work after RS Linx talks to the PLC? But if you power cycle your PC it stops working? What if you cycle your PLC?
 
Not exactly... I post this command because Jiri told me that ML1500 is not suppose to accept this command (write using three adress fields), but it does !!

My problem is different... Every time I restart my computer I cannot communicate with the PLC. I have to start rslinx and then shotdown it in order to be able to communicate well. Looks like my comm settings aren't good. Should baudrate and parity has to be set to specify values ??

Thanks for help.

Nicolas.
 
So I assume that your VB app and RS Logix are on the same PC? You may just simply have an issue with RS Linkx hogging the comm. port. Go into services on your PC. Make RS Linx manual instead of Automatic on startup type and try that.
 
I already did it, and I'm sure at 100% that RsLinx is not running while I try to send command.
I don't have any exceptions opening COM port whereas I'm having some when Rslinx is running.

Should I have to set some comm settings in the PLC ??

Thanks for taking your time to help me.

Nicolas Chaillou.
 
Look into the Windows API functions: GetCommState and SetCommState.

When I had a similar problem, I used GetCommState before and after running the communication program that worked (this would identify if it is a port configuration that you need to adjust). When I found a difference, I used SetCommState to duplicate the working settings obtained from the 2nd GetCommState.

Good luck,

Marc
 
Thanks Marc,

your idea was great and make me find the problem... Bytesize has to be set to 8 and Bits1 to 1... it was stupid but unless I change those settings It wouldn't work !!

Thanks helping me !!
 

Similar Topics

Trying to recover an old well controller ML1000 using DF1 Half Duplex and my RSLinx won't allow me to create a DF1 Polling Master Driver. I am...
Replies
2
Views
1,492
I no longer have an option to select df1 path and was wondering if anyone has ran across this. I can configure in RSLinx Classic and see the PLC...
Replies
7
Views
2,037
I am trying to configure driver RS-232 DF1 device for AB SLC 5/04 plc through RS link but its showing error "Failed to find the baud & parity ...
Replies
13
Views
5,939
I am trying to hook up a GE QuickPanel View to an Allen Bradley MicroLogix 1000 via serial. Once I load the runtime into the View I get the...
Replies
2
Views
4,489
Hi Everyone, I want the Allen Bradley driver for interface the elipse scada. I also went to the elipse site,but I am unable to download the...
Replies
2
Views
3,073
Back
Top Bottom