01-06-2022 08:57 AM
hello friends,
I have the UMD 98 meter and need to access it via a fixed IP address. I have fixed registers that I need to read out. in the registers are "Word" with 2 bytes each. a total of 4 bytes corresponding to "Float 32". the two float values need to be converted so that I can display the voltage. I can't find my problem. Can someone help me with this. i am attaching the VI.
Solved! Go to Solution.
01-06-2022 09:27 AM
I don't have the Modbus library you are using but I have used the NI Modbus library.
The NI Modbus library is probably somewhat similar in that is has a VI for reading multiple Modbus registers
I was working with a power analyzer and created a "Get Primary Measurements" vi
All of the primary measurements use two registers. I read the registers and the Modbus VI returns an INTEGER (Well it this case a U16 integer array since it is multiple registers)
Then I combine the two registers and convert them to floating point
01-06-2022 09:38 AM
Can you send me the code section so I can use it on myself?
01-06-2022 09:54 AM - edited 01-06-2022 09:55 AM
@JuniorLabview wrote:
Can you send me the code section so I can use it on myself?
Those are code snippets, you can drag and drop them right onto a block diagram.
But drag and drop may not work with some (most) modern browsers
01-06-2022 10:45 AM
I have been able to do it but it remains as an image and I cannot use the appropriate tools and do not know where to find them all. Can you put the two pictures you sent in a VI and post them?
thank you
01-06-2022 11:12 AM
With your code how can I connect with the IP address? can I open the connection with a TCP where I can enter the IP address and with which TCP could it be?
01-06-2022 11:21 AM
When you use the NI Modbus library, there are other subVI's which will create the connection and close it when you are done. The code RTSLVU isn't showing the open or close part, but you can find it in the palette where you get the NI Modbus subVI's.
01-06-2022 11:56 AM
Thank you, I found it.
I still have one question, I didn't find the orbiting one in the picture in the palette. How do I find it?
01-06-2022 11:57 AM
@JuniorLabview wrote:
With your code how can I connect with the IP address? can I open the connection with a TCP where I can enter the IP address and with which TCP could it be?
Well my code was using Modbus Serial, you will need to use Modbus TCP.
You will have to install the NI Modbus library and use the "Create Modbus Instance" vi set to "New TCP Master".
I linked to the discussion forum thread for the NI Modbus library in my first post but here is is again: LabVIEW Modbus API
01-06-2022 12:03 PM - edited 01-06-2022 12:08 PM
@JuniorLabview wrote:
Thank you, I found it.
I still have one question, I didn't find the orbiting one in the picture in the palette. How do I find it?
The left circle is around an Array Constant. It's in the Array Pallet.
You will need to refer to your devices register map for the proper values
The right circle is around two things. Index Array, that is also in the Array Pallet and the "Bytes to DBL" Vi that I posted the snippet of in my first reply.