LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from a Power Meter with Modbus

Solved!
Go to solution
Solution
Accepted by Wavicle

How many registers do you try to read using this command ?

 

Can you try register 7274 with the size set to 1 ?

 

Also remove the while loop from your VI and close the connection.

 

Message 21 of 43
(1,811 Views)

I get the same error, maybe I don't have communication with the power meter

0 Kudos
Message 22 of 43
(1,807 Views)

still error 56 ?

Message 23 of 43
(1,805 Views)

Ok, How did you connect everything ?

Did you try to swap the two data wires ?

0 Kudos
Message 24 of 43
(1,802 Views)

Yes, still error 56 but this time in the shutdown VI. 

I connected the wires as shown in the instructions of the converter I am using and swapping them gave me the same error. I attach the user manual, maybe there is something there that I don't understand and that is the problem

0 Kudos
Message 25 of 43
(1,754 Views)

Hi KC,

 The error 56 disappeared,  I did what you said about closing the modbus connection outside of the while loop and right now I have connection with the device but I cannot see anything, when I run the VI the output that I have is in 0 always

0 Kudos
Message 26 of 43
(1,750 Views)

Hi,

 

When I look at the VI's of the library I don't see that the returned data is checked.

So it looks like anything that comes back is already an answer.

EDIT

I was looking at the wrong place. There is a check for the answer. So no error means communication is Ok !!

 

You can try another address to see if this helps and if there is an error.

 

Kees

0 Kudos
Message 27 of 43
(1,725 Views)

Hi,

 

I made a mistake, I can read data. I don´t know if it is right because I read 60k A when the device says 0.04 A but it's something

 

Thanks

0 Kudos
Message 28 of 43
(1,714 Views)

Hi,

 

But you don't why it failed at first ?

 

The data you read is a float32. I think you have to translate this.

Try to read something like settings or serial number.

 

Kees

 

Message 29 of 43
(1,693 Views)

Hi

 

Yes, at first it didn't read anything because I changed one of the parameters by mistake without knowing.

 

It reads fine, to get the real values I need to translate the output to float32 big-endian, how can I do that?

 

Thanks

 

0 Kudos
Message 30 of 43
(1,685 Views)