gjels Posted February 7, 2009 Report Share Posted February 7, 2009 Hi, I am working with a NI 9871 (serial RS485) an I seems to have a problem with sending a command to a instrumt. The instrument is connected to the NI 9871 with 2 wires, which is connected to pin 4 og 8(+) and pin 5 og 9(-) on a DB-9 connector. Is this a 2 wire connect or 4 wire? I ask because when I sent a sing to the port on the NI9871 I get the same string back if I use 4 wire mode but nothing if I use 2 wire mode. This instrument needs a 4 letter ASCII string and will return a long string with data. In order for the instrumt to reconise that a command is being sent it needs a break signal. The instrument manual says this about the break signal: “The break Signal suspends the character’s transmission on the serial line, setting it to a break status. In this status, the voltage level of the transmission line from the computer to the Anemometer passes from nominal -12V to +12V. “ Does Labview sent this kind of break signal? -gjels Quote Link to comment
viSci Posted February 7, 2009 Report Share Posted February 7, 2009 Your connection as indicated is 2-wire. You need to make sure your instrument and the 9871 are both setup for 2 wire auto mode. Quote Link to comment
gjels Posted February 10, 2009 Author Report Share Posted February 10, 2009 QUOTE (sachsm @ Feb 6 2009, 03:36 PM) Your connection as indicated is 2-wire. You need to make sure your instrument and the 9871 are both setup for 2 wire auto mode. Ok thanks, I'll try and see iof that could be the problem. Quote Link to comment
gjels Posted February 11, 2009 Author Report Share Posted February 11, 2009 QUOTE (gjels @ Feb 9 2009, 08:04 AM) Ok thanks, I'll try and see iof that could be the problem. I check this and made a test. I still do not get a reply from the instrument. I have to sent a 4 letter ASCII code to the instrument doing this dioes not give any data back. Below is shown how the command has to be sent. I think that it is the way I am sending the break signal which might be the problem. But I kown very little about serial communication so I can not see what I might be doing wrong. ____________________ In order to communicate with the network-connected HD2003 units, the Host Master Computer has to respect a prefixed protocol: 1. Through the transmitted command, it has to specify the address (Identicode) that univocally identifies the unit to which the command refers. 2. Before sending the command, the Host Master Computer has to force the transmission line into the Clearing Mode (Break Signal) for 2ms, at least, returning then to the Marking Mode (rest condition). 3.The command is made up by 4 ASCII characters: M<ID><x><x> __________ -Gjels Quote Link to comment
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.