I am implementing Devicenet slave device, in which I want to use a POLL command but I am stuck with the expected_packet_rate in POLL. what should be the default value of it . why should I configure expected_packet_rate in POLL because in POLL the slave will respond to master command and there is no specific chance that master will request every time after a specific interval. master can request at any time asynchronously so what is the need of using expected_packet_rate in POLL . is there any specific use of it kindly explain me thanks in advance PMM
That depends on your application, it is also one of the parameters that the master can set when it opens the poll link
The EPR is used to configure the timeout for the connection, if you look at the DeviceNet specification you will see that the POLL connection must time out after several (I don't have my spec. here, I can't remember how many) EPR times, at which point there is a product specific timeout handler, some sevices switch all outputs off, others set a special output, some set the outputs to programmable values - depends on the product, but the connection must be set to a timeout fail state and can't respond to any more POLL commands until it has been reset.
The default value of the expected_packet_rate attribute for the Poll connection instance (and other I/O connections) should be zero. See Table 7.3, "Default Poll Connection Object attribute values".
The expected_packet_rate attribute for the Poll connection must be configurable because the DeviceNet Specification says so. "Important: As far as attribute modification is concerned, Predefined Master/Slave I/O Connections (at a minimum) support the modification of the expected_packet_rate attribute."
Figure 7.3, "Predefined Master/Slave I/O Connection State Transition Diagram" shows that setting the expected_packet_rate is how the connection transitions from the "Configuring" state to the "Established" state. This is why the master will set the expected_packet_rate after allocating the connection.
Think of it from a different perspective. Say, for example that the master establishes the Poll connection with a slave but then the master goes off-line for some reason. How can the slave know that the master is no longer using the connection? How can the slave know to close the connection so that the connection can be re-established?
This situation is why the expected_packet_rate is important to the slave. If the slave does not receive a message from the master in four times the expected_packet_rate then it will close the connection.
The master *does* have to periodically send the Poll request to the slave in order to keep the connection open.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.