06-20-2006 03:15 AM
06-21-2006 08:53 AM
06-28-2006 07:39 AM
cyco-miko,
I do this all the time without any problems. I have found no differences between the two.
This sounds more like a connection issue. Are you using the same serial cable to connect the pc and the cFP to the instrument? If not look at the cable.
centerbolt
07-03-2006 09:36 AM
07-04-2006 08:06 AM
07-14-2006 06:14 PM
07-17-2006 07:39 AM
Fabien,
Just got back from a little R&R. Went back and revisited my serial projects. I have successfully done this 2 different ways. I have used the same cable to talk both from the PC and cFP to the instrument. I have also used one cable when talking from the pc to my instrument & a NI 10 position modular cable with the RJ connector when talking from my cFP to the Instrument. In my case the instruments are DTE devices and require a custom null-modem (crossover ) cables.
The 9 pin serial port on the cFP is a DTE type just like the port on the PC. Pinouts are identical.
You can look in the manual for your instrument to determine if it is a DTE or DCE device.
Use a modem ( straight-thru ) cable to connect a DTE device to a DCE device. Use a null-modem (crossover cable ) to connect a DTE device to another DTE device. Be aware that there are many variations of crossover cables and the you need to find right one for your instrument if it is indeed a DTE device.
Can you give me the name and model # of the instrument you are using? I'd be interested in reading the spec on its serial port.
I really don't think that your problem is pinouts. This still sounds like a handshaking problem.
centerbolt
07-18-2006 04:02 AM
Hi everybody,
As I also come back from holydays I make a global answer to your messages !!
Graziano, I try once again to save my Vi for LB7, hope it will be OK this time.
I've applied your suggestion so I built two VIs to send character from the PC and read it from the cFP and vice versa (like a client server application). The result is perfect. The number of character is determined by the "bytes at port" property (and the result is OK) and I exactly read what I've sent. No problem.
Hosehead and Centerbolt, I've checked the cable and it seems that I use the right one, a straight thru cable.
The instrument is (as far as I understood the DTE and DCE specifications) a DCE as the the Db-9 pin descriptions are :
Pin 2 : TXD
Pin 3 : RXD
Pin 5 : Ground
There's nothing more on the instrument manual.
So it should work well with a straight thru cable as the cFP DB-9 pins are :
Pin 2 : RXD
Pin 3 : TXD
Pin 5 : Ground
Moreover I insist on the fact that the writing from the cFP to the instrument works perfectly and that only the reading is random.
The instrument I'm trying to command is a temperature calibrator TC 150 from Tek Know (distributed by Scan Sense). The description of the serial interface is quite "light".
I tried to check all points you suggested but without success until now...
Thanks again for you help,
Fabien
07-18-2006 08:15 AM
Fabien,
You are correct, the manual is very "light" on technical content. No mention of any handshaking requirements at all. Might see if the manufacturer has any more technical info on the RS-232 port.
The only difference between the PC and cFP should be some minor differences in speed of execution and maybe the default state of some of the handshaking lines on the serial port. I suppose that you could also have a damaged RS-232 port on the cFP.
Do you have an oscillosope available? It might be faster to remove your while loop, write a single command and watch what the instrument sends back to the cFP.
centerbolt