01-15-2016 02:10 AM
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?
01-15-2016 04:11 AM - edited 01-15-2016 04:19 AM
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
01-15-2016 04:12 AM
Hello mkoppelgaard,
why are you reading 200 bytes with the function VISA read? I think you don't need to read so much bytes.
Kind regards.
01-15-2016 04:44 AM
01-15-2016 04:45 AM
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... 🙂
01-15-2016 07:25 AM - edited 01-15-2016 07:26 AM
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.
01-15-2016 08:19 AM
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?
01-15-2016 08:52 AM
please try this one. I made some corrections on it. I hope, I will work.
01-15-2016 09:11 AM
01-15-2016 09:49 AM
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…?