09-21-2011 12:16 PM
I have a .hws file (digital) that is backward. I need to swap the LSB and MSB to reverse the playback order. Can anyone tell me how to do that?
Solved! Go to Solution.
09-21-2011 12:19 PM
Are you asking for bit order or byte order? I'm going to assume byte order since you message says swap MSB and LSB and not bit order which would not make sense for a file system.
If you read in the file as binary data, let's say with U16, you can use the Swap Bytes function and write it back out as a binary file.
09-21-2011 12:20 PM
Jallen,
Here's a link that you must read if you havent already.
http://zone.ni.com/devzone/cda/epd/p/id/1758
Does this help?
Regards
09-21-2011 12:22 PM
Specific to your problem, you just treat it as a binary file, and then you can swap bytes easily with the functions pallette.
Regards,
09-21-2011 12:26 PM
I have a digital WDT file with 7 signals. I need the end of the waveform to be the start.
09-21-2011 12:30 PM
Does that mean that you want the whole waveform data reversed? Starting from the last data and ending with the first?
Or, does it mean that you want to swap bytes/bits for each data?
09-21-2011 12:34 PM
whole waveform reversed
09-21-2011 12:36 PM
The solution still stands.
Read the file as a binary file. Read out the bytes and write them back in reverse order.
Does it help?
09-21-2011 02:49 PM
can you give me an example of this? I have attached a file that I'm trying to reverse.
09-22-2011 02:59 AM
Jallen,
Refer to this document to convert your hws file to an lvm format.
http://digital.ni.com/public.nsf/websearch/396B0B404275CEDB862571DE005250EA?OpenDocument
You can then read the measurment file using the express VI and extract the data.
After you extract the data we can easily reverse it and write it back.
Regards,