LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual

LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual
Pages 97
Views 842
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-43LabVIEW LEGO MINDSTORMS NXT ModuleNXTFileOpenWriteParameters:This system call method attempts to create a file with the name specified by Filename and size in bytes specified by Length, then keep the file open for write operations. You must specify the total file size using the Length parameter when you create the file. If you do not use all of the memory allocated for a particular file before closing the file handle, you can open the file for further write operations using the NXTFileOpenAppend system call method.If the return value is zero, the file creation operation was successful. The File Handle output is assigned a unique handle for use with NXTFileWrite and NXTFileClose and the Length output is assigned the current length of the file. Furthermore, this file is registered for use with NXTFileResolveHandle.If the return value is non-zero, an error occurred attempting to open the file. You can ignore the File Handle. This file is not registered for use with NXTFileResolveHandle.Only four files can be concurrently opened for write operations. This limit includes files opened with NXTFileOpenAppend.NoteFile creation involves writing data to flash, so this system call method is subject to the performance issues previously described. NXTFileOpenWrite is potentially subject to the most flash writing delay of any method. Creating a very large file can result in a delay of up to 30 ms.ParameterData TypeI/O DirectionDescriptionStatus CodeU16outputRefer to the 57,File Access 57, Status 57, Codes 57, section.File HandleU8outputUnique handle to identify open fileFilenamestringinputMaximum of 19 characters (15.3 filename)LengthU32input-outputLength of file in bytes