Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sudden Framing Error with Serial Port

Hey

   So I have a Keithley 2400 Sourcemeter hooked up to my pc through a serial to usb cable. It was working perfectly about a week ago, however my Labview VI was causing the pc to crash (BSOD). So in an effort to solve this problem I went about reinstalling / updating all the associated drivers I could. Bad new is...now the Keithley doesn't work.

   (As far as I know) I have all the drivers for the Keithley that I did before and it DOES communicate through VISA Interactive Control and MAX. (i.e. ID query works) However when I try to run a basic VI with the Keithley it returns a Framing Error.

   I've read through all the NI forum posts and google results I could find and nothing has helped. I know it's not noise in the cable because I tried three different cables and none worked (though they worked with another similar instrument), and I've checked that all the serial settings are correct too.

   I'm at a loss, I can't figure out why it works with MAX but not in a simple VI. (the error comes right out of the initialization BTW, refer to the attached image)

 

I'd really appreciate some help. Thanks in advance

 

Ian

0 Kudos
Message 1 of 9
(3,706 Views)

Is on the Keitley still the serial port selected. maybe it is in GPIB mode.

Another problem is the serial setting, what is it on both sides?

greetings from the Netherlands
0 Kudos
Message 2 of 9
(3,670 Views)

The keithley is on RS-232 mode and all the serial settings match. As I said it does communicate in MAX though.

0 Kudos
Message 3 of 9
(3,668 Views)

Ian

Which driver do you use?

Can you post the source of the vi instead of a screenshot?

 

greetings from the Netherlands
0 Kudos
Message 4 of 9
(3,666 Views)

The drivers I'm using are NI certified (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=25B255F3AA83660EE0440003BA7CCD...)

 

I've narrowed it down to the "initialize" that is causing the problem (I think). I whipped up a VI that simply opens the connection then closes it and it was the initialize that gave the error. Though I did the same with the VISA palette and it works fine. However, I've already written a rather large VI using these drivers and it was only a week or so ago that it was all working!

 

Thanks again

0 Kudos
Message 5 of 9
(3,662 Views)

I tried also and had to change the terminator in the Keithley to LF

after that it worked.

9600 baud

no parity

no handshake

8 bits

1 stopbit

greetings from the Netherlands
0 Kudos
Message 6 of 9
(3,656 Views)

Smiley Frustrated Smiley Frustrated

 

Didn't work. I had tried all that previously, but figure it's worth a shot to try again. No luck.

 

I did notice something though, it seems that it usually (not confident in saying always) will give an ID query error on the first run after starting up, then the framing error on the second, third, etc. Don't know if this makes a difference, just figure i'd point it out.

 

So, in a bit I'm going to wipe the hard drive and start over. Hopefully after installing just the necessary drivers / programs / etc. it will work.

I'll let you know how it goes. 

 

Thanks

0 Kudos
Message 7 of 9
(3,652 Views)

good luck, not a nice situation

greetings from the Netherlands
0 Kudos
Message 8 of 9
(3,646 Views)

Success! So after wiping the HD and reinstalling windows I started fresh and just installed the drivers I needed. At first it did not work, I system restored back before those drivers and tried again. It appears the problem was a conflict of drivers. I am communicating with the instruments through a serial to USB cable. I can get the drivers for this cable from either the disk it shipped with or from the website (the disk also has multiple versions of the driver) It seems like I had either tried to install another version or installed the wrong version and this is what caused the problem. I plugged the cable in and let it pull the driver from the internet (Prolific's website) and it works.

 

A new problem however, is that Labview will now freeze mid-run. I cannot stop my VI and it will not close the connections even once I close Labview, requiring me to restart my pc to reset it. Any idea what this could be?

 

Thanks again for everyone's help!

0 Kudos
Message 9 of 9
(3,633 Views)