As you can see from the VISA Write and VISA Read functions they have String as input and output. And these functions are not polymorph so you can use only this type.
There are only two functions with which you can convert data to String. One is the "Byte Array to String" in the String >> String/Array/Path conversion palette. In this case the bytes must be already in the correct order. The other is the "Flatten to String" in the Advanced >> Data Manipulation palette.
Using this function you will get flattened data. This data is always in big endian form. This data will be converted correctly into the representation the machine has which runs the "Unflatten from string" function.
Think of sending a cluster of a I16 followed by a I32. The I16 has the value 0x0102 and the I32 has the value 0x11121314.
Using "Flatten to string" you get the data string containing 0x01 0x02 0x11 0x12 0x13 0x14. This is the Big endian representation. If you need the Litte endian representation you have to unbundle the cluster, split number and build array.
The VISA functions do not have any type information so they do not know which bytes/words to swap.
If you have the bookshelf installed go to Help>>Search the LabVIEW bookshelf >> Application Notes and white papers >> LabVIEW Data Storage to learn about the Flatten and Unflatten functions and how LabVIEW generates the data strings.
So connecting two LabVIEW applications with serial line and using flatten and unflatten you do not need to worry about endianness because these functions do this for you. If you connect a LabVIEW application together with a non LabVIEW application you have to provide the correct endianness by yourself if you do binary transfers. You can format your data into a string with the string functions and scan the string on the receiving part. This way you will transfer text and you do not have to worry about endianness because the format and scan function will do this for you.
The Byte order attributes are only valid in the VXI classes and are used for low level memory access of VXI devices. This is described in the NI-VISA programmers reference manual which is installed with your VISA.
Waldemar
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions