From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS485 pump control via Labview

Solved!
Go to solution

Yes, I think that this information is not enough... but I only have this.
I will contact my supplier to find out more about the Modbus interface.
I'll keep you posted.


Nicolas

0 Kudos
Message 11 of 26
(1,145 Views)

I have received feedback from the supplier with details of the pump's communication protocol (see attachment).

What type of data model is preferred to control start and stop, and also speed on Labview? (Coil register, Input register or Holding register)

 

Thanks.

 

Nicolas

 

0 Kudos
Message 12 of 26
(1,123 Views)

Did you set the pump in RS-485 mode ? 

To be able to read register 0 the pump must be in RS-485 mode.

 

 

0 Kudos
Message 13 of 26
(1,096 Views)

Hi,

 

Yes, i set the pump to RS-485 mode. (I have chosen the "RS485 enable" mode).

 

0 Kudos
Message 14 of 26
(1,084 Views)

Hi Nicolas,

 

Do you know if your RS-485 interface is working ?

Can you show a screenshot of the VI after trying to read 1 register at address 0 ?

 

Remove the ModBus write and remove the while loop. Just the open ModBus, read ModBus and close.

 

Meanwhile I will try to read the 'manual' to see if it is really standard ModBus.

 

Kees

0 Kudos
Message 15 of 26
(1,050 Views)

Well it seems that the device is not communication according the ModBus protocol !!

 

At page 30-31

4、(0x11) Report Slave identification Inquire:Slave address +0x11+CRC16-hi+CRC16-lo
response:Slave address +0x11+ The number of bytes +SlaveID+ Operating status
indication + Additional data +CRC16-hi+ CRC16-lo
For example : Tx:01 11 C0 2C // Sends a read device identification command

 

The command 0x11 is not a standard MB command. The MB CRC of 0x01-0x11 = 0xC1 0x9C

Also the second byte of the answer is the number of bytes returned. In the example this is 0x11 = 17 while there are 60 bytes in the answer !?!?

 

The standard write register start pump: Tx:01 05 00 01 FF 00 DD FA

Here also the CRC is not correct. This should be: 0xDD 0xE1

 

If this is all true you cannot use the ModBus library for this device.

 

Let me create a VI for you that send the inquire command and see what happens.

 

Kess

Message 16 of 26
(1,035 Views)

Ok, forget the CRC error I was using the wrong calculator.

Can you do what I asked in the previous post to read 1 address

0 Kudos
Message 17 of 26
(1,023 Views)

Thanks again for your help.

 

You will find the screenshot and 2 proofs that the pump uses the Modbus protocol.

 

PS: For the reading of the address, I am certainly doing it wrong.

0 Kudos
Message 18 of 26
(1,008 Views)

If you did not got an error than the action was successful !!

Add an indicator for the registers read and error out. See attached

0 Kudos
Message 19 of 26
(956 Views)

Thanks KC, I can actually control my pump now !


Last problem: I can't use the "double" addresses like "2 3" or "13 14" (see the Input register table or even in the Holding register table).
If I understood correctly, these data are floats.


Do you have an idea?

0 Kudos
Message 20 of 26
(924 Views)