problems using C1/2 instead of rs232 port_Campbellsci论坛问答

I have a seabird probe continually output string data that I am connecting to a CR1000. When I connect it to the RS232 port with a null modem cable, I have success reading the string data. Program looks like this and works fine:

BeginProg
SerialOpen (ComRS232,9600,0,0,200) 'SeaBird - 9600 None-8-1 and clears buffer
SerialOut (ComRS232,CR,"",0,0)

problems using C1/2 instead of rs232 port_Campbellsci论坛问答

Scan (5,Sec,0,0)
SerialOut (ComRS232,Pollcmd+CRLF,"",0,0) 'sends a TS command (take sample)
SerialIn (SeaBirdData,ComRS232,490,CRLF,100)
SplitStr (ParseStr(),SeaBirdData,CHR(44),2,5)
SerialFlush (ComRS232)
CallTable Seabird
NextScan
EndProg

however when I use leads (pin 2/3 rx/tx and pin 5 gnd) instead of the standard Rs232 cable and change in the program ComRS232 to Com1 (or to any of the com1..4), I have no success. Baud rate is the same, as is parity/data/stop bits. Switching pin 2/3 leads does not yield desired results either. My cable worksI have set the baud rates in DevConf as well, and all are correct.

Anyone seen this before? suggestions?

many thanks,
SJP

新对话如下:

I'm not familiar with the sensor, but if it works with a multi-pin RS232 cable but not with only Tx, Rx, and Gnd, it sounds like there may be some other control pins missing. Often these can be dummied on the sensor end if needed, e.g., to assert DSR or CTS or whatever. The sensor specs or manual should detail what is required for it to work.

新对话如下:

Issue resolved! Turns out the Seabird probe puts out true RS232 and the CR1000's Com1 to 4 ports were designed for TTL, not true RS232. Using a max233 chip we converted the signal to TTL and now are in business and capturing serial data on the com ports..

The sensor works on the CR1000's RS232 port because that port does accept true RS232 levels.

Campbell Scientific has a serial input/output module (SDM-SIO1) which will solve this issue if anyone else encounters this, but the max233 (or max232) chip/board is easy to put together (as well as more cost effective) if you're savvy in this arena.

新对话如下:

Just to correct one minor detail here. The loggers inputs will accept RS232 levels that comply with the generally accepted levels. The catch is that the logger only outputs 0-5V outputs which in a few cases are not accepted by sensors as being valid on their inputs, normally either because they use a type of Maxim chip with a power down option (that shuts down when the logger idles at 0V) OR because the sensor requires RS232 levels to power its own RS232 outputs. In some cases those restrictions can be overcome with software changes in the sensor or external wiring links.

As you say the SDM-SIO1 does offer true RS232 or RS485 outputs.

Adding external driver chips is another option but you do need to be careful about surge and static protection, which can cost more than the RS232 driver chip to add properly.

分享到:

原文链接:,转发请注明来源!
海洋仪器网 仪器使用 problems using C1/2 instead of rs232 port_Campbellsci论坛问答
「problems using C1/2 instead of rs232 port_Campbellsci论坛问答」评论列表

发表评论