67nate Posted July 20, 2007 Report Posted July 20, 2007 I can't seem to comunicate with the Agilent I was able to when I was using GPIB but now I need to with RS-232 and I can't get it to work. I'm getting error -1073807246 which is Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->6temp.vi So I know somethings wrong with my configuring of the serial port but I don't know what. I have checked all the settings like baud rate and parity and the are all correct. Does any have any ideas? Quote
Neville D Posted July 20, 2007 Report Posted July 20, 2007 QUOTE(67nate @ Jul 19 2007, 10:00 AM) I can't seem to comunicate with the AgilentI was able to when I was using GPIB but now I need to with RS-232 and I can't get it to work. I'm getting error -1073807246 which is Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->6temp.vi So I know somethings wrong with my configuring of the serial port but I don't know what. I have checked all the settings like baud rate and parity and the are all correct. Does any have any ideas? 1 'Configure Serial Port' should be outside the loop so the port is configured at start, and never again. 2 Visa Resource Name should be COM1 or COM2 i.e. the serial port in use; in your case you have it set to 34970A? 3 Have you configured the instrument to use 19200/No Parity/Stop bits..etc same as the settings of your COM port? 4 Try running the code without a While loop to see if it even works on a single run. 5 There may be a way to communicate simply with your instrument using NI-MAX to see if you have all the settings right. If it works in MAX it should work with your code (i.e. you have set up the instrument correctly). Neville. Quote
67nate Posted July 20, 2007 Author Report Posted July 20, 2007 sorry, I attached the wrong code (it is now updated) I used Measurement and Automation explorer to communicate and that is working But labview doesn't But it should be com 1? I wasn't sure if it was that or the 34970A (the one that worked for the GPIB) I tried both and neither work. It seems like I'm missing something in initilizeing the serial port but I havn't a clue what. Quote
Neville D Posted July 20, 2007 Report Posted July 20, 2007 QUOTE(67nate @ Jul 19 2007, 11:45 AM) sorry, I attached the wrong code (it is now updated) I used Measurement and Automation explorer to communicate and that is working But labview doesn't But it should be com 1? I wasn't sure if it was that or the 34970A (the one that worked for the GPIB) I tried both and neither work. It seems like I'm missing something in initilizeing the serial port but I havn't a clue what. Run the code with the Lightbulb ON. Is the error coming frm the Init Serial? If so, play around with the parameters until it works. Data bits 8, Parity None, Stop bits 1, Flow Control Off seem OK values. Try termination character Enable or Disable and of course set the Baud rate to match, or even Stop Bits None (check your Agilent manual to see what they recommend). Have you tested with MAX using the Serial connection or GPIB? If serial, try to figure out what the settings for the COM port in MAX are. I seem to remember there was a way to generate code when sending some commands from MAX. Generate code if you can from there, and run that. Try a very simple program No loop etc to complicate anything (run in execution highlight mode->light bulb ON, so there are delays after every step): Init Serial Port Write command *IDN? Read response (it should be the identifying string for the instrument "Agilent...blah blah serial number..etc.") Sorry I have no hardware to help any further. You might look at the example code for the instrument included with the driver. Try running something simple from there. Neville. Quote
orko Posted July 24, 2007 Report Posted July 24, 2007 Have you tried to use the instrument driver found on the NI developer network? Its initialization works fine for my 34970A. Download it here. I think this will clear up your problem, since you said the instrument is working in MAX it is probably just the way you're initializing things. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.