DF! protocol master driver query

shroffsp

Guest
S
Dear

I am trying to develop a DF1 master driver for SLC5/03 using c on linux. I donot have any experience in programming AB PLC. But I am an Instrumentation Engineer with a lot of experience in DCS.

I am referring the AB's DF1 protocol manual for the development.
I have been successful in reading the integer file location (N7:39).
What I have observed is I am getting a word as a result (respnose = 1247 Hex) of my reading. I am entering a value of 99.9 for this register from the PanelView ( The range specified for this tag is (4 to 100 in the Panel View)

What I want to know is -- does word result require scaling ? I have scanned the DF1 protocol manual. It is silent on this topic. If any scaling is required than, what is the scaling equation to be used?

Can any body provide me any links or code of DF1 driver or protocol anyalser with which I can verify my results?
 
It could be scaled in PanelView.
Can you read it by Rockwell software 1'st from PLC what is the reg-value ?
Could it be that byte-ordering is different ?
N7:39 sounds as 16-bits integer variable.
 
Hello Schroffsp;


In the world of Allen-Bradley, different data formats are accessible in different files. In choosing an address such as N7:39, you are using an Integer format; since you are inputing a floating-point value (99.9), you should try a floating-point type file, such as F9:xx. All data treated in this type file will be formatted and treated as a 32-bit floating-point value. You should make sure that the limits in your PanelView re 4.0 to 100.0 (floating point values)so your input can match the file type.
Hope this helps,
Daniel Chartier
 
Get yourself a protocol analyzer such as the SerialTest available
from B&B electronics. You need to tap into the Rx and Tx lines of your RS-232 comm cable and route these to two different comm ports
(Rx line and Gnd line only) on another PC!
SerialTest actually is shipped with cable splitters which will do just that.
Real cheap way would be to download a BreakOut box by TAL technologies
for free. It has however limited features compare to the SerialTest.
I suggest that you write VisualBasic routines to send in strings
of test data based on the info you have learned from the DF1
manual. Start with the BCC check sum terminated strings since these are easier to generate than CRC.
Keep in mind that the DF1 data is in a BIG ENDIEN format
high and low bytes are swapped.
Also don't do the floating point numbers until you have mastered
the simpler integers.
By the way in the DF1 terminology the "RESPONSE" is considered to
be either a DLE NAK, DLE ACK or DLE ENQ.
Fully implemented DF1 full duplex driver wich confirms 100% to the
AB spec is a fairly good size time consuming job requiring lots of testing and checking. I don't know what you mean by DF1 MASTER driver?
Are you referring to the half duplex?

good luck
 
You can't believe every thing you see on the internet.

JT said:

Keep in mind that the DF1 data is in a BIG ENDIEN format

Show me! I am alway willing to learn something new. ( Maybe JT will waste as much time find trying to find this information as other will waste by following JTs advice ).

JT, have you ever written a DF1 protocol driver?

JT said:

high and low bytes are swapped.

As opposed to what? I hate documentation that says that also.
 
The scaling of the integer value is done in the panelview.
This is certain as a word value is used for the tag.
A decimal point is simply inserted at a position that the panelview programmer specifies.
The value 1247hex that you get doesnt seem to make sense. Somehow you should get a value of 999dec (3E7hex) when the panelview displays 99.9.
Interestingly, 999dec is 1747oct ! Are you sure that the value was really 1247 and not 1747 ?
 

Similar Topics

Hello, I am programming a Master Slave Serial Communication Protocol (SIKONETZ 5) for SIKO AP05 (Absolute Position Indicator) by using TwinCAT 2...
Replies
0
Views
1,226
Hey, i'm working on implementing the master side of a custom serial master-slave protocol between a B&R PLC and an electronic card. As part of the...
Replies
0
Views
1,748
Hi All, I wanted to make my CJ1M-CPU12 a master Modbus-RTU using CJ1W-SCU31v1. Is this possible if my serial module CJ1W-SCU31v1 is in NO-PROTOCOL...
Replies
1
Views
2,588
is it possible to commutate from Slave to master in MODBUS Protocol Details:I want to use S7 200 in MODBUS on Slave Mode .When it detects that his...
Replies
8
Views
7,457
Dear Sirs! I have to inform you that in some area terms like Master-Slave is not considered politically correct. The only communication...
Replies
10
Views
4,092
Back
Top Bottom