LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read MODBUS Registers

Solved!
Go to solution

Just curious, what brand/model of serial/USB adapter are you using?

0 Kudos
Message 21 of 32
(1,482 Views)

It's a very old adapter, one that had the model # worn off! I just picked a new one up and it allowed me to turn the echo off. Thanks again for the help!

0 Kudos
Message 22 of 32
(1,474 Views)

Hello, I am new on MODBUS and I am trying to read a temperature value from a slave with the same VI as you.

I just know that :

My slave adress is 202

The temperature is on the registre 0x200E

 

I use a converter USB/RS485 on port COM12

 

If I run the VI I have a timeout and nothing is written on "buffer de lecture". Can someone help me ?

0 Kudos
Message 23 of 32
(1,366 Views)

What is the datatype of your constants that you are building into an array?  They should be U8. Because I see a conversion dot on your Byte Array to String function, I'm suspecting you do not have an array of U8's, you probably have a U32.  In which case every byte you send is getting converted to 00 00 00 xx where "xx" is the U8 value you are trying to send.

0 Kudos
Message 24 of 32
(1,362 Views)

You are right, I was in U32. I convert it on U8 but the problem is the same

0 Kudos
Message 25 of 32
(1,355 Views)

Are you sure about your checksum values?  When I build your command string and use the LabVIEW modbus library, it tells me the checksum should be BE73  not 65F8.  It looks like you just copied the checksum values from message 13 rather than calculating them yourself.

 

 

I highly recommend that you use the NI MODBUS Library for LabVIEW

0 Kudos
Message 26 of 32
(1,343 Views)

Exactly, I just copied the checksum from message 13. If I put BE73 on checksum it works ! Can you explain me how do you obtain the cheksum value with the LabView modbus library ?

 

Thank you very much for your help and sorry for my bad english

 

0 Kudos
Message 27 of 32
(1,331 Views)

The modbus library has all the subVI's built-in to build the commands for you, including the calculation of the checksum.  You just need to install it and drill down through it to see how it works.

0 Kudos
Message 28 of 32
(1,324 Views)

It double posted for some reason.

0 Kudos
Message 29 of 32
(1,324 Views)

When I try to do exactly the same thing as before with the modbus library I have a Timeout and I read nothing. I do something wrong ? Can you just show me where do you find the checksum value ? IS it the "Exception Code" ?

0 Kudos
Message 30 of 32
(1,285 Views)