Direct serial control of Agilent serial device - PUTTY? - Page 1
Forum section: electronics / testgear

author: Tracker
author_rank: Regular Contributor
timestamp: January 25, 2019, 06:29:43 pm
content: Folks,I'm not having any joy with serial control, I just can't get Command Expert to recgnise my instruments.Is there a way to issue low level commands directly to the instrument, like using PUTTY or some interface which can at least prove my wiring is correct?I have a new USB-Serial adapter and a new Null modem cable.I also had issued installing Command Expert, and it is still very slow to open.So any of the above could be causing the issue.I'd like to bypass Command Expert and send serial commands directly to my COM port and at least see if the instrument responds.Can this be done using Putty?Thanks

author: nctnico
author_rank: Super Contributor
timestamp: January 25, 2019, 11:21:35 pm
content: You can use any terminal program. Putty can be used.

author: Tracker
author_rank: Regular Contributor
timestamp: January 26, 2019, 11:16:21 am
content: Thanks NCTNicoAnd I guess I just send commands as per the Agilent command listings.I shall give it a go.

author: jpb
author_rank: Super Contributor
timestamp: January 26, 2019, 12:16:50 pm
content: There should be an identifier command (*IDN or something like that) which is the best to try just to check the connection is correct with the right number of bits/stop bits/baud rate.

author: Tracker
author_rank: Regular Contributor
timestamp: January 26, 2019, 06:55:34 pm
content: Ok, so I'm I'm getting a response from the instrument (34401 Multimeter) which is guess is progress but it just beeps and reports 'Error' which reads to be a Syntax Error.According to the manual *IDN? should return the instrument identity string, but I just get the error above.Ive tried spaces, commas etc.. am I missing something obvious?Ive followed this handy guidehttps://www.keysight.com/upload/cmc_upload/All/HyperTerminal.pdfThanksTracker

author: HoracioDos
author_rank: Frequent Contributor
timestamp: January 26, 2019, 08:10:06 pm
content: Tio from Martin Lund should work.https://github.com/tio/tioPS: You can try lxitools via scpi commandshttps://github.com/lxi-tools/lxi-toolsDeveloper is usually in the forum

author: Tracker
author_rank: Regular Contributor
timestamp: January 27, 2019, 10:12:10 pm
content: Thanks HoracioDos,But I suspect something more fundamental is wrong with my setup.Putty or similar terminal interfaces should be able to establish basic serial comms.The error I get suggests something is getting through but the Agilent doesn't like it.The cheap eBay USB-RS232 adapter uses a Prolific driver which Win 10 'says' is installed correctly.I will try playing with that, perhaps look for another driver.Tracker

author: SilverSolder
author_rank: Super Contributor
timestamp: January 28, 2019, 02:43:55 am
content: Are you sure you are sending the correct end of line character(s)?Some instruments like linefeed, some like carriage return, some need both...

author: Kean
author_rank: Unknown
timestamp: January 28, 2019, 10:07:50 am
content: Have you checked the serial configuration in the 34401A settings? They may have been altered from default.You can partially check your USB Serial adapter by shorting out pins 2 & 3 to create a loopback so anything you type in Putty is echoed back.

author: Tracker
author_rank: Regular Contributor
timestamp: January 28, 2019, 11:39:00 am
content: Thanks folks,Yes I previously verified that shorting pins 2 and 3 created local echo.I've also made sure the Agilent is set to Serial and the correct rates.I also made sure my device manager had the same settings.Regarding carriage return and linefeed.I shall try adding /r and /n or both to my test commandSo it will be*IDN? /r /nI'll test this tonightThanksTracker

author: coromonadalix
author_rank: Super Contributor
timestamp: January 28, 2019, 11:44:40 am
content: I had many problems with Prolific drivers, now i use ch340 or ftdi based usb to rs232 adapters, ditched all the others i hadEven ftdi clones will work up to a certain driver version, and i block drivers updates.You have CuteCom terminal ??

author: Kean
author_rank: Unknown
timestamp: January 28, 2019, 12:54:31 pm
content: OK, I had to drop by the office this evening so I quickly tried thisI normally control my old 34401A via GPIB, so I went into the I/O Menu and changed interface from GPIB to RS232, and confirmed other settings were was 9600, 8, NONEI grabbed an old FTDI RS232 adapter (from before the clone wars) and a null modem cable and hooked it up to my Win 10 PCConnected via Putty, and got the same issue as you - an error on the 34401ATried via RealTerm (terrible UI, but very powerful for testing things like this) and found I needed to send LF or CRLF not just a CR... Probably standard for SCPI!Went back to Putty and type *IDN? followed by CTRL-J and it responded as expectedHTH!

author: Tracker
author_rank: Regular Contributor
timestamp: January 28, 2019, 01:47:11 pm
content: Fantastic Kean!Many thanks for doing this.I shall give it a go tonight when I get home.Once I can prove the hardware wiri6is good then I can start to figure out why Command Expert is having problems.CheersTracker

author: Tracker
author_rank: Regular Contributor
timestamp: January 28, 2019, 07:23:36 pm
content: That worked perfectly.Many thanks Kean, you saved me a lot of hardship trying to figure it out.Tracker