Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Sartorius scale via serial, error 1073807253

Hi,

I'm trying to read a Sartorius PR1713 scale (x5) via serial cable, but I am recieving errors.  I know the serial cable is hooked up properly because I can connect to the console via Hyper Terminal just fine.  I've also checked all the port info, such as parity, data bits, etc.   The VIs I am using are made by Sartorius for this scale:  http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=5583

I am using the "Example Get Weight" vi.  The error I am getting is 1073807253, and it occurs at the Read VISA within the "Sartorius Print" vi.   Before that vi, I am sending the print command "1B50" which is the default.  I don't really understand where this comes from, and if anyone does, more information/links  would be appreciated.  I looked up the error code, but I think Sartorius already has that stuff covered: there is a timeout function in the "initialize" vi already (which I have tried increasing), and they clear the data right after opening.

I looked around and found a nice VI from here: http://forums.ni.com/ni/board/message?board.id=140&message.id=11526#M11526
Called "Seriel Tester" and tried this out.  I don't know what RTS/DTR states are, but I tried writing both "1B50" and "\1BP\r\n" and it didn't seem to do anything.  The "online" indicator does not turn on, does this indicate my problem is with my settings? 

Since the cable is hooked up, the port settings are correct (because I must use those settings with Hyper Terminal) and the VI was made by Sartorius, I don't understand why it is not working!  If anyone could help me get either Seriel Tester or the Example Get Weight working, that would be wonderful.

Thanks,

            ---Loadcell
0 Kudos
Message 1 of 24
(8,465 Views)

That error code indicates a framing error which indicates a mismatch of the com settings. Not sure why you mention timeout unless you have not recorded the error code correctly. The VI sets the com port to 1200 baud, RTS/CTS flow control, odd parity, 7 data bits, and 1 stop bit. Is this exactly how you setup Hyperterminal?

By the way, the VI was written by NI as far as I can tell. There's nothing on the download site that says it was authored by someone from Sartorius.

Also, the 1B50 is the hex equivalent of ESC-P.

0 Kudos
Message 2 of 24
(8,461 Views)
Thanks for the reply,

I thought the error code was due to timing issues because of this page: http://digital.ni.com/public.nsf/allkb/F3E0621CB71AA16786256F970000FC57
But I think com problems are more likely.  I do not use the default com port settings of the vi, I open the Sartorius Initialize vi and change them to 9600 baud, etc.which are the settings I used for hyperterminal.  I can run the vi with the light bulb on and the probe indicates that the settings I chose are being passed along. 

I found a list of the hex command equivalents, so that clears that up.
0 Kudos
Message 3 of 24
(8,454 Views)
You changed the settings on the front panel, did a Make Current Values Default, and then saved the changes?
0 Kudos
Message 4 of 24
(8,449 Views)
I only changed the settings, because I didn't know about the Make Current Values Default option.  I've done that now, but as I said, it does appear that the values I chose are being passed along correctly.
0 Kudos
Message 5 of 24
(8,445 Views)
But did you save it after making the current values default? If you did not, the only way to pass the changes to the subVI is to have it set to show front panel when called and paused so that you can manually change them.
0 Kudos
Message 6 of 24
(8,443 Views)
Yup, I saved it.  Now when I start LabView and open the vi, and go into the initialize vi, the settings that are displayed are what I chose.

If it helps, after the program finishes a dialog box for the 1073807253 error says the possible reasons are:
VISA:  (Hex 0xBFFF006B) A framing error occurred during transfer.

From what I gather about a quick google search, does that mean the vi is reading before/after the console is sending?

Thanks for helping!


0 Kudos
Message 7 of 24
(8,438 Views)

I know it means framing error. That's what I said in my first response. It does not mean that the VI is reading before the instrument is sending. See the KB at http://digital.ni.com/public.nsf/websearch/13A20C0F9DF265FB86256FC60066D9C2?OpenDocument.

I did a quick search of the Sartorious web site but could not immediately find a manual for this model. Since I don't know how you changed the instrument's default com settings, I can't comment on that but maybe you should change it back to 1200, etc. and change the VI you modified to what it originally was and try it that way.

0 Kudos
Message 8 of 24
(8,431 Views)
It works!  Sort of... the problem was with the initialization.  However, the reading I am getting now is either nothing or ">□[0K" 
I have no idea what that means, but at least it is progress.
0 Kudos
Message 9 of 24
(8,426 Views)
The output word is only 6 bytes instead of 22, and if you look at the Sartorius Print vi you will notice that a header is supposed to be 6 bytes long.  The weight value is ">\1B[0k" and when I put a hex indicator on the output of the VISA read, I get "3E1B 5B30 4B0D"

Does that mean anything to you?
0 Kudos
Message 10 of 24
(8,420 Views)