Chapter 2Extensions to LabVIEWLabVIEW LEGO MINDSTORMS NXT Module2-14ni.comNXTCommLSCheckStatusParameters:This system call method checks the status of the I2C communication on the specified port. If the last operation on this port was a successful NXTCommLSWrite operation that requested response data from a device, BytesReady indicates the number of bytes in the internal read buffer. You can access this information using NXTCommLSRead.If the return value is zero, the port is idle and the last operation (if any) did not cause any errors.This method can return the following non-zero status codes:Commonly, ERR_COMM_BUS_ERR means that either no digital device is connected to the specified port or the connected device is configured incorrectly. Attempt to write new data to the device to clear the error condition.If you see ERR_COMM_CHAN_NOT_READY, make sure SensorType is set properly and InvalidData is FALSE for this port before attempting further transactions.If you see STAT_COMM_PENDING, an operation is in progress and you should not interrupt it. Avoid calls to NXTCommLSRead or NXTCommLSWrite until NXTCommLSCheckStatus returns zero or a negative error code.ParameterData TypeI/O DirectionDescriptionStatus CodeI8outputRefer to the following status codes.PortU8inputPort, [0, 3]BytesReadyU8inputNumber of bytes ready for reading, if anyStatus CodeEnumDescription320x20STAT_COMM_PENDINGPort is busy performing a transaction.–350xDDERR_COMM_BUS_ERRLast transaction failed (possible device failure).–330xDFERR_COMM_CHAN_INVALIDSpecified port is out of range.–320xE0ERR_COMM_CHAN_NOT_READYSpecified port is not properly configured.