Instrument Control (GPIB, Serial, VISA, IVI)

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

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 Compliments
Message 1 sur 15
4 891 Visites
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 Compliments
Message 2 sur 15
4 876 Visites

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 Compliments
Message 3 sur 15
4 868 Visites

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 Compliments
Message 4 sur 15
4 850 Visites
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 clignant de l'œil
 
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 heureux
0 Compliments
Message 5 sur 15
4 847 Visites
Here's a bitmap of the connection. Thanks. 🙂


Message Edited by azwhoony on 12-03-2007 02:41 AM
0 Compliments
Message 6 sur 15
4 846 Visites
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 Compliments
Message 7 sur 15
4 839 Visites
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 Compliments
Message 8 sur 15
4 809 Visites

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 clignant de l'œil  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 Compliments
Message 9 sur 15
4 802 Visites
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 clignant de l'œil
 
Thanks.
0 Compliments
Message 10 sur 15
4 798 Visites