01-07-2022 08:45 AM
I'll take care of you.
can you save the two VI's in 2012 version, because I work with it.
thank you
01-07-2022 12:04 PM
Hello,
It worked. I was able to read the value from the register and convert it too.
My next question is:
I have 3 registers and need to output 3 voltages at the same time. How would it work. Do you know?
Here is a picture of how I programmed it
01-07-2022 12:21 PM - edited 01-07-2022 12:22 PM
@JuniorLabview wrote:
My next question is:
I have 3 registers and need to output 3 voltages at the same time. How would it work. Do you know?
Three SINGLE registers or three two register values?
Are all the registers in sequential addresses?
01-07-2022 12:26 PM
So each register has 2 values that are then translated.
Example
Register 1 = 1234, 5678
Register 2 = 1234,5678
Register 3 = 1234,5678
Result
Register 1 = Voltage 1
Register 2 = Voltage 2
Register 3 = Voltage 3
01-07-2022 01:07 PM
all registers are in one address
01-07-2022 01:16 PM
@JuniorLabview wrote:
So each register has 2 values that are then translated.
Example
Register 1 = 1234, 5678
Register 2 = 1234,5678
Register 3 = 1234,5678
Result
Register 1 = Voltage 1
Register 2 = Voltage 2
Register 3 = Voltage 3
I don't understand you are saying one register is holding two values? Most common Modbus registers are a 16bit unsigned integer (U16). Where's the comma coming from? Is it two 8bit values being held in one 16bit register?
01-07-2022 01:25 PM
No, that's not a comma.
the values that are in the register, it is a word, are each 2 bytes in size and a total of 4 bytes. and 4 bytes is also exactly the size of a float 32.
01-07-2022 01:41 PM - edited 01-07-2022 01:42 PM
@JuniorLabview wrote:
No, that's not a comma.
the values that are in the register, it is a word, are each 2 bytes in size and a total of 4 bytes. and 4 bytes is also exactly the size of a float 32.
So each register is one 32bit register?
01-07-2022 03:25 PM - edited 01-07-2022 03:28 PM
Okay I took the time to track down a manual and skimmed it... BTW: I suggest you study this manual very closely
Uln1 base address is 1100h
Uln2 base address is 1102h
Uln3 base address is 1104h
That means each measurement uses two registers.
Now if I were going to get all three voltage measurements at the same time. I would read all six registers at once (start at 1100h and set the number of registers to read to 6). That would then output a U16 array of six elements. Index the elements and convert them using the combine and convert VI I gave you.
01-07-2022 05:43 PM
I don't know what to say. I can only say thank you very much for your effort. I will be able to test it on Monday.
Thank you very much and have a nice weekend