02-20-2012 06:41 AM
Hellooo Everyone,
I have one basic question related to VISA Read function. After sending a querry to my unit I received one byte (U8) as 01, but in the property node of bytes at ports it shows the number of bytes as two. Why is it so??? Why it is taking 0 & 1 as seperate byte?
Thanks & Regards,
Manisha
02-20-2012 09:39 AM
What is your "unit"? Are you sure the "unit" (whatever it is) is sending binary data, or is it sending characters. I.e., is it sending the value 0x01, or is it sending the characters "0", and then the character "1"? Or, perhaps your "unit" (whatever it is) is adding, for example, a linefeed character. Or, perhaps your "unit" (whatever it is) is adding some other termination character. Or...
Without more information we cannot answer your question.
02-20-2012 09:39 AM
Manisha,
Without seeing your code I cannot be sure. Several possibilites exist. The device may have sent more bytes after the read. The device may have sent a termination character which Bytes at Port counted but which the Read stripped off. The device may have sent two bytes but your program is only configured to read one. Does the Bytes at Port execute before or after the Read?
Lynn
02-21-2012 12:30 AM
Thanks Smercurio_fc & Johnsoldfor your reply.
Am developing a front end for "load cell amplifier". After sending querry to this unit it reads a 6 bytes data. This data is in 0x00 form not in character data types. M attaching the image of output on hyper as well as my code. My actual problem is, I want to calculate CRC for the same data. In the attached VI I have explain that problem also. M getting two different output for CRC, one is in normal form & other is in HEX form. Please see the code n help me out with the same.
Thanks & Regards,
Manisha
02-21-2012 08:39 AM
So, are you asking a different question now? I'm confused as to which issue is being addressed here.
How are you running your program? Please don't say you're using the Run Continuously button. If so, STOP. That is NOT intended for normal operation. Use a loop. Put the VISA Configure outside the loop, your write/read/parse inside the loop, and your close outside the loop.
02-21-2012 10:44 PM
Hello smercurio_fc,
M not asking a new question now. But problem of CRC calculation is because of this bytes counts thats why I asked that. This is just a part of project n m not using run continuously. The attached VI was only a sample code for CRC calculation. I just want why that 01 is treated as two bytes? What is the form of output in VISA Read?
Thanks & Regards,
Manisha
02-21-2012 11:08 PM
02-22-2012 12:32 AM
The string is in Normal display form not in Hex n I have already mentioned that m not using any termination character. It is 01 only i.e. one byte and reading two bytes at port.
02-22-2012 12:41 AM
02-22-2012 01:43 AM
Thanks Dennis.
That means labview (VISA Read) accepts asciii as a default data types. Is it like that, if I change the input data types to Int, Float, Signed Int then labview (VISA Read) gives me different