Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI PCI 485/8

Hi everyone,
 
Has anyone use NI PCI 485/8 card for modbus application? I just want to clear on something. Does the modbus query string should echoes back with the received data? Are there any option to set this?
 
Thanks.
0 Kudos
Message 1 of 15
(4,710 Views)
Hey azwhoony,
Sorry to tell you, but Modbus does not send a Receive Bit. Modbus will only write what you send to the registers of your device. The following Developer Zone Article has more information about the capabilities of Modbus, it could be helpful to you in your project

Regards
Can Wong
0 Kudos
Message 2 of 15
(4,695 Views)

Hi Can W,

Thanks for your answer. Actually I didn't mean that. What I'm trying to ask is when I use RS485-RS232, the recieve string that I get is the response data from instrument. But if I use NI PCI 485/8, I will get back the query string together with the recieve string. Let say I send 01040000000271CB..then I will recieve 010404436633341B38(converter). But if I use NI PCI 485/8 I will get 01040000000271CB010404436633341B38. Basicly I don't have any problem with the protocol. I just want to know is there any option not to echo back the query string. I was told that usually there's an option to configure this at the converter side. 

 

Thanks.

0 Kudos
Message 3 of 15
(4,687 Views)

Hi,

Like CanW said; Modbus slaves don't echo the received string (except for the loopback command)

What you see is not a echo from the modbus device but the send data wired back to the receiver.

I think you use the PCI card in a wrong mode (2 wire / 4 wire) and/or wired the connector in a wrong way. Can you check this ?

 

0 Kudos
Message 4 of 15
(4,669 Views)
Hi KC,
 
Thanks for responding. I thought what CanW said was referring to the slaves but I'm actually pointed to the option for the PCI card. Maybe I was giving the wrong idea.Sorry Can W. Smiley Wink
 
Right now it make sense. Actually what you suspect is true. I am using 4-wire mode for 2-wire connection because I can't get the right response from other mode. Based on NI Serial Interface connectors(DB9-RS485), pin 5 & 9 should be at A and pin 4&8 should be at B. But if pin 4 and 8 are shorted together, it will give the wrong response. The only connection that I can use (5,9)<-->A, (4)<-->B, (1)<-->Gnd. I contacted NI person here earlier for explanation and they told me  that this is not a standard connection and maybe NI not familiar with the product. So that's why I'm using that setting.
 
So if you or anyone can suggest me any idea for this matter I would be glad to know about it.
 
Thanks. Smiley Happy
0 Kudos
Message 5 of 15
(4,666 Views)
Here's a bitmap of the connection. Thanks. 🙂


Message Edited by azwhoony on 12-03-2007 02:41 AM
0 Kudos
Message 6 of 15
(4,665 Views)
Connecting pin 4&8 and 5&9 is OK. Did you also set the transceiver mode of this port to 4-wire in MAX ?
0 Kudos
Message 7 of 15
(4,658 Views)
Yes KC. I already did that. If the wire-mode to be other than 4-wire, I wont get any correct data from device. I wonder is it ok not to use Tx+ (pin 8)..my concern now is to grab data from registers as fast as I can. If I use the card, I can only ask for 20 register at one query. But if I use rs485-rs232 converter, I get 70-80 registers. If only I can get around this number using the card, would be efficent for me already.
 
Thanks 🙂
0 Kudos
Message 8 of 15
(4,628 Views)

Hi,

The RS-485 interface is a balanced line. So ommitting one of the connections may work. It depends on your device. the interface board, the cable, the weather....Smiley Wink  So normally; yes you should connect Tx+

Do you also get the data back if don't connect your device ? In other words does the return data comes from you interface connection on your board or from the connected device.

I don't how to get the board faster. You can try to use greater buffers, but I don't know if this helps.

0 Kudos
Message 9 of 15
(4,621 Views)
Hi,
 
I only get back the query string if the device is connected. Are you saying that it must be something to do with the device connection? But again..how come if I use RS 232/485 converter this is not happening?
 
About getting faster response from device...how can I decrease time interval between query message. Right now..I can only send a frame for 200ms time without adding any delay in the program. Do you also get that or there's a way for this?
 
Hope to learn more from the expert. Smiley Wink
 
Thanks.
0 Kudos
Message 10 of 15
(4,617 Views)