I am using your devicenet interface card on my laptop. I need to be able to
set an attribute for the I/O connection. The attribute is
PRODUCED_CONNECTION_PATH for the poll connection (instance #2 of the
Connection Object ID #5).
However, this attribute can only be set if the Poll I/O connection is in
the
configuring state, as shown in the attached pdf file taken from the
DeviceNet
Specifiation (page V-I, rev2, page 5-43).
The Poll i/o connection is normally taken to the CONFIGURING STATE as
follows:
I use the Master/Slave predefined connection
(typically)
ALLOCATE EXPLICIT CONNETION (1)
SET EPR FOR EXPLICIT CONNECTION TO 0 (NO TIME OUT)
(epr == expected packet rate)
ALLOCATE POLL CONNECTION
Poll connection is now in the configuration mode, allowing the above
attributes to be set over the explicit connection.
To change the poll connection to the Established State, you just set the
poll
epr, or
SET EPR FOR POLL TO 0 (NO TIME OUT) OR TO ANY OTHER RATE DESIRED.
Now when I use your subroutines to open the poll io channel (ncOpenDnetIO
(...)), your subroutine always immediately sets the poll epr, causing the
mode to be Established which prevents me from setting the attributes on the
connection object.
Any solution?
Also, do you have any lower level commands that I can use, where I can
build
up my own devicenet messages?
I think you need to write a new subroutine, as follows:
NAME:
ncConfigDnetIO( IntfName, DeviceMacID, etc)
FUNCTION:
allocates the poll connection, but does not set the epr, establishing the
poll connection into the CONFIGURING STATE.
You then need a function to set the epr, although I could do just do that
with an explicit message.
You will also need to update NC_ATTR_STATE to include configuring as a
state.
Also, in the subroutine ncOperateDnetInf, you have the following opcodes:
START
STOP
ACTIVE
IDLE
Since these terms are not used in the DeviceNet specification, I'm a little
bit at a loss to understand what they do. Please refer to section 5-4.6 of
volume 1 (page 5-36 of rev2) and look at the Figure 5.14 and Table 5.22.
These are the I/O Configuration Object State Transistion Diagram andthe I/O
Connection State Event Matrix, respectively. Could you explain how your
opcodes above correspond to the DeviceNet Spec?
If I were to guess I might make the following assumptions:
START ----> take connection to "configuring state"
STOP ----> delete the connection, taking it to the"non-existent state"
ACTIVE ---> take the connection to the "established state"
IDLE ---- > take the connection to the "timed out state"
Am I guessing correctly? I really don't want to have to reverse engineer
this. Also, it would be a help if you used the terminology in the
DeviceNet
specification, instead of making up your own.
Finally, since the poll produced_connection_path is volatile, it is not
possible to preset with another controller and then use it on your system.
--
Jerry C. Wyss, Colorado Flow Technology, Inc.
4939 N Broadway Suite #66A, Boulder CO 80304
Work: (303) 440-0730 Home: (303) 494-1971 (voice/fax)
Fax: (303) 545-2615 Mobile: (303) 641-3225 (preferred number to call)
VoiceMail: (800) 253-2047