Robert Carlsson
Member
I am using SFC 59 to read data using DPV1 from a PROFIBUS slave to a PLC.
My problem is the length, I know the RET_VAL holds error code or read length depending on if any error occurs and the length of the record where the read value should be placed. My problem is when to sample the output to retreive the actual transferred length? In my block, a PROFIBUS slave is read several time, and I am sure the data doesn't change at any time, but still I get different lengths.
Should I read the RET_VAL just when the BUSY signal transists from 1 to 0, just when it has reached 0? Does anybody know?
My problem is the length, I know the RET_VAL holds error code or read length depending on if any error occurs and the length of the record where the read value should be placed. My problem is when to sample the output to retreive the actual transferred length? In my block, a PROFIBUS slave is read several time, and I am sure the data doesn't change at any time, but still I get different lengths.
Should I read the RET_VAL just when the BUSY signal transists from 1 to 0, just when it has reached 0? Does anybody know?