LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MOXA, RS-485, ModBus RTU


@Gadjetins wrote:

2111-1.jpg2111-2.jpgtest.jpg

Found two examples on the net, but I have questions about the first picture in the red highlighted area. for me it is not clear how I can use it at myself and whether any example can help me if I alter it.

The code in the red box tells you how to convert registers into another datatype then divide by 10.  It does this one register at a time.  The code after the red box is likely doing it on pairs of registers and would probably have a U32 or I32 constant wired into the typecast.  This would be logical considering your second picture shows 4 bytes (2 U16 registers) being converted into a value.  The writer of this code should have turned on the labels for the constants and typed in something that described the datatype of the constants.  The example might be able to help you.  You need to read the manual of the device to see how the registers you want to read should be interpreted.

 

The second is more or less clear, but I would like an expert opinion whether it is possible to transfer this way a command from numbers and the received answer to process? )

I don't understand your question.  All this picture shows is the basic Write and Read of data at the simplest level.  You'd have to do your own work to build the Write command and checksum, and determine if the response is valid.

 

In the third picture I tried to remake the first image, but as a result I see an error. (port settings took for other device, the issue with the cable UDG-1B to solve it is not yet possible)

That error message is a framing error which means something is wrong with the serial port settings.  Most likely number of stop bits or parity.  Could also be data bits and less likely the baud rate.


This thread has gone on for a long time and you still don't seem to be making progress.

Have you taken time to read the manual for this device?

0 Kudos
Message 51 of 52
(1,029 Views)

Thank you for answering the questions! I think I should learn more! You can close the topic

0 Kudos
Message 52 of 52
(1,017 Views)