09-26-2006 08:46 PM
10-02-2006 01:37 PM
10-02-2006 04:44 PM
10-03-2006 04:27 PM
10-04-2006 06:39 PM
Dear GrantM,
Thank you for your detailed and clear explanation of absolute file paths in MathScript. As you can probably tell Mat*** is not my usual language (C and LabVIEW are what I usually use) and I am quite unfamiliar with common restrictions of m_files and their search paths. I would find it very useful to be able to use paths relative to the install path. As you correctly point out LabVIEW vi's can be used to pass script data to MathScript nodes. Being a fundamentally lazy person I would find it quite convenient to use m-scripts that others had written and to use them with few changes or fragmentation. I can imagine that this implicit desire for a relative path option (since I now understand that this is what would be involved) could cause a lot of work on your part and understand that not all wishes are equally likely to come true.
Reading binary files which contain data from C structures (with their variable data byte sizes) can be difficult, especially if the data offsets have to be calculated on-the-fly. If you don't have an fseek function then in MathScript you seem to need to (a) check that the file is closed, (b) open the file and fread a slab of bytes to get to the correct point (c) fread the data you want, (d) close the file, (e)open the file and fread a slab of bytes to get to the correct point(f) fread the data you want, (g)close the file etc etc . With fseek you can select data from the file in any order you choose and which is convenient. The ability to jump around in the file with a byte count input to fread (not just where it is after the previous fread) would be almost as convenient. The present MathScript fread functionality seems to assume that a file is read linearly from start to finish in contiguous chunks, some of which may be discarded. I suppose that you might suggest that linear readout is the logical way to do things but sometimes I am at the mercy of my colleagues.
Regards,
Worried_of_Bexley
10-05-2006 10:18 AM
10-08-2006 04:51 PM