I reading data from a balance.
The balance is set to auto print which means that I print continually.
My data should look like “ 182.12 g”. The string should start with a space and end with a carriage return.
Unfortunately my data often looks like this “øø^ñ 182,12 g”
The RS232 settling for the balance should be 2400,none,7,1
What am I doing wrong?
increase your wait time step by step untill you get no wired data also attach byte at port to number of byte to read instead of 200
why are you reading 200 bytes with the function VISA read? I think you don't need to read so much bytes.
Try attached vi... I added a VISA CLEAR after initialisation. I hope the rubbish data disappears that way...
Then I wait for the buffer to be 5> bytes before reading. “ 182.12 g” , but it should be 9 if your Visa-input is always 9 bytes...
When your data ends with a carriage return, then you should use it. Make sure you enable the termination character in the Serial Configure and that you set it to carriage return (13 or x0D). By default it is enabled but is linefeed (10 or x0A). Then you can use a sufficiently large number (200 being just fine) with your VISA Read. And as Dennis said, you don't need the "Bytes at Port" property.
Thank you Xilinx. N
RavensFan: My data ends with 13 10. I dont understand this "Make sure you enable the termination character in the Serial Configure and that you set it to carriage return (13 or x0D)" ? Where do I do this settling?
From time to time I recieve the error 1073676294. What can be the reason?
please try this one. I made some corrections on it. I hope, I will work.
Erdalozandilek: The previous version was better. Now I get wrong results again.
Dennis: Since the sting ends with 0D 0A I guess the default settling is okay?? But do the settling course the string to be cut after 0D0A or…?