12.07.2015 Views

RAPID reference manual - Technology

RAPID reference manual - Technology

RAPID reference manual - Technology

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ReadRawBytesFile and Serial Channel HandlingInstruction[\Time]Data type: numThe max. time for the reading operation (timeout) in seconds (resolution 0,001s).If this argument is not specified, the max. time is set to 60 seconds.If this time runs out before the reading operation is finished, the error handler willbe called with the error code ERR_DEV_MAXTIME. If there is no error handler,the execution will be stopped.The timeout function is in use also during program stop and will be noticed in the<strong>RAPID</strong> program at program start.Program executionDuring program execution data is readed from the device indicated by IODevice.If using WriteRawBytes for field bus commands, such as DeviceNet, the field busalways sends an answer. The answer must be handle in <strong>RAPID</strong> with the ReadRawBytesinstruction.The current length of valid bytes in the RawData variable is set to the readed numberof bytes. The data start at index 1 in RawData.Error handlingIf an error occurs during reading, the system variable ERRNO is set toERR_FILEACC.If time out before the read operation is finished, nothing in the variable RawData isaffected and the system variable ERRNO is set to ERR_DEV_MAXTIME.These errors can then be dealt with by the error handler.SyntaxReadRawBytes [IODevice ’:=’ ] < variable (VAR) of iodev> ’,’[RawData ’:=’ ] < variable (VAR) of rawbytes> ’,’[ ’\’ Time ‘:=’ < expression (IN) of num>] ’;’388 <strong>RAPID</strong> <strong>reference</strong> <strong>manual</strong> - part 1, Instructions A-R

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!