LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual

LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual
Pages 97
Views 836
Downloads : 2 times
PDF Size : 572.7 KiB

Summary of Contents

LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual

  • Chapter 2Extensions to LabVIEW© National Instruments Corporation2-15LabVIEW LEGO MINDSTORMS NXT ModuleNXTCommLSWriteParameters:This system call method copies data from the buffer input to an internal write buffer and instructs the NXT firmware to perform a transaction by sending the write buffer to the device and reading ReturnLength bytes back into the internal read buffer.If the return value is zero, the method successfully started a communication transaction. Use NXTCommLSCheckStatus to monitor the status of the transaction.This method can return the following non-zero status codes:ParameterData TypeI/O DirectionDescriptionStatus CodeI8outputRefer to the following status codes.PortU8inputPort, [0–3]BufferU8 arrayinputUp to 16 bytes for writing to deviceReturnLengthU8inputNumber of bytes expected from device in response to writing data in Buffer; maximum 16Status CodeEnumDescription–330xDFERR_COMM_CHAN_INVALIDSpecified port is out of range.–320xE0ERR_COMM_CHAN_NOT_READYSpecified port is busy or not properly configured.–190xEDERR_INVALID_SIZEEither buffer size or ReturnLength exceeded 16-byte maximum.