LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP/ip Error 56

Yes.As i already mentioned with unit id=1 i can not communicate with module by modbus poll software.

Unit id has been set to "0" in the module and i can not change it.

0 Kudos
Message 11 of 20
(3,282 Views)

The Unit ID is the Slave address. You say you cannot change it. But it is a constant in your VI.

So you can change it.

 

ModBus Poll Software ???? ModBus is a Master-Slave connection I don't what ModBus Poll Software is.

0 Kudos
Message 12 of 20
(3,270 Views)

Hi again

 

Thanks my friend for your reply.

The Slave id of module is "0" and is fixed internally.I don't have possibility of changing that.

So

I just can communicate with module via ID="0".

Modbus poll is a software for connecting devices via modbus .Just search net.It is popular.

 

I experienced in modbus poll that by setting ID=0 i can communicate with my slave module without ant error(and of course by modbus poll software).When i change id from 0 to 1 , communicating will not establish and just receive error(in modbus poll).

NOW

 

I just need to :

read coil status of module by labview program.I wrote such a program but i receive error 56.

I was in doubt about antivirus.I disabled it but nothing changed.

Perhaps any toolkit should be installed.If so,please guide me dear friends.

I really need your help.

 

best regards

0 Kudos
Message 13 of 20
(3,260 Views)

Well it could be that the toolkit VI does not receive any data because normally there is no data to receive when the Unit ID/Slave address is 0. 

But I cannot see that. That is why I created my own ModBus VI's (also because we use dedicated ModBus commands)

 

You can ask NI what the LIb does with a read registers with Unit ID 0

0 Kudos
Message 14 of 20
(3,254 Views)

Is there any other solution ?

IO server or ...

0 Kudos
Message 15 of 20
(3,249 Views)

I will try to build a VI for for test. Need to find the time.....

0 Kudos
Message 16 of 20
(3,244 Views)

@nanocycle wrote:

Is there any other solution ?

IO server or ...


Try the library found here.  MODBUS Library for LabVIEW

 

It is a bit older, but I still use it.  Though I mainly do serial not TCP/IP.  Another advantage is that you open up all the subVI's to see how they work.

0 Kudos
Message 17 of 20
(3,233 Views)

Hi,

 

Forgot all about this old Lib.  Thank you

I checked and I don't see that is doing something else when the unit ID is 0

 

Nanocycle: Can you try this Lib ?

 

Kees

0 Kudos
Message 18 of 20
(3,224 Views)

Dear Friend,

 

i am not familiar with using old lib.

can you guide me how to use it?

 

regards

0 Kudos
Message 19 of 20
(3,179 Views)

It's pretty similar as to how the new libraries work.  You initialize the connection, you use the read and write subVI's and select the version for the type of register you want to read and write, and close it out the end.  Use context help to read what each of the inputs mean.

0 Kudos
Message 20 of 20
(3,130 Views)