02-12-2014 10:16 AM
Hi everyone,
sorry to post this kind of question again, but I've spent 2 days browsing this forum, the Mathworks forum, and several web pages, I still can't find the trick that will solve my problem 😞
I am trying to control an Agilent 34970A (with the 34908A 40-channel module) to read temperature values from thermocouples. I am using a laptop (win7/64) and a USB-to-serial adapter (MCT U232-P9, which uses the Philips P87C52X2BA chipset, not the FTDI, in case it makes a difference) and I installed the driver for this adapter. The adapter is recognized by Windows and appears as COM4.
I set the COM port parameters in Windows as they are on the device (9600 Baud, Parity:none, 8 Data bits, Flow Control: Xon/Xoff; the stop bits are not specified on the device).
And... TADAAA... it doesn't work!
I tried using NI MAX (version 5.5), LabView (version 2013/32-bits), and MatLab (R2012b) to send the *IDN? command and read the answer. The "write" part goes ok (at least it doesn't generate an error, but I don't know if the command reaches the instrument), but there is no answer from the device. If I try reading from the COM port, I get the 1073807339 error (timeout before operation completed). I tried to look if there were any Bytes to be read at the port, but there are none...
In LabView, I set the Xon and Xoff characters to those specified in the Agilent manual (0x11 for Xon and 0x13 for Xoff), but there are a few other parameters I'm not so sure about: 'Enable Termination Char' (Should be On or Off? Tried both - no change) and the termination char itself (I left it to the default '\n').
I know this is not really an NI/Labview issue, but since so many people in this community seem to have experienced this problem, I would be very grateful if anyone can help me solve this!
Thanks in advance
Mathieu
Solved! Go to Solution.
02-12-2014 11:05 AM
02-13-2014 01:43 AM
Dear Dennis,
Thanks for your reply. My instrument is configured for RS-232 communication (but you are right, GPIB is the default setting), and I checked the settings once more: 9600 Baud, Parity: None,8 data bits, Xon/Xoff Flow Control, which are the same as those configured on my laptop. As for the null modem/straight through question, I actually don't know how it is wired (the adapter came with no manual, and I couldn't find anything on the web other than an installation guide, as this product is not supported by MCT anymore). Do you know any way to check this?
Could there be another reason why the reading/communication with my instrument doesn't work?
thanks again
mathieu
02-13-2014 02:09 AM
02-13-2014 02:21 AM
No I don't have anything else than the adapter. The MCT device (http://www.mct-us.com/index.php?_Page=product&mode=show&cid=29&pid=65&_lang=E) is an adapter that connects directly to the RS232 connector of my instrument + a USB cable that goes to the usb port on my laptop. Do you mean I should insert a null modem cable between the adapter and my instrument instead of connecting the adapter directly to my instrument?
02-13-2014 02:35 AM
02-13-2014 03:54 AM
Thanks so much!
It's such a relief to see it working 😄