LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus Help!

Solved!
Go to solution

The address 40001 = channel address 0 and 40002 = channel address 1 work if i enter another address i get the 6001 error. I have tried putting in value 3276 in my register using address 201 and 202 but still get the 6001error. Any suggestions very helpful, is it because the ADAM is acting as a master and i have it as a slave i dont know. I have set my power supply using the ADAM utility tool as in i have five volts on the display. Should my read holding registers be able to read this value?Because it doesnt at present.

 

Damien

0 Kudos
Message 11 of 30
(3,690 Views)

It is very unlikely the unit is operating as a master.

 

Assuming you have set the unit from ASCII to modbus.

 

40001 and 40002 are shown in Appendix G as R/W (read write) which tells me that they are the proper location to send your writes.

40201, and 40202 are listed as Channel type - this is where you you set the output type of the channel.

 

Why are they failing? I don't know. But my fisrt suggestion was to download modbus poll and construct a connection that works. You can watch the traffic and see the modbus frames, this should tell you exactly how to configure the Labview master query blocks.

 

0 Kudos
Message 12 of 30
(3,675 Views)

Hi thanks very much for being so helpful i have downloaded the modbus poll, it works with my ADAM 4068 series i enter my slave ID 4 function write multiple coils address 16 and quantity 8, change the value from 0 to 1 and the coil switches.

 

 

When i try to do this for ADAM 4024 i follow the same procedure for read holding registers with quantity 2 and select the write multiple registers when i try to enter in a value 3267 i get a write error for address 200 and 203 and a timeout error for address 201 and 202 at slave address 6?

 

If i read from anotheer slave address i get a read error. I can talk to the ADAM 4024 with the ADAM utility module so it is working fine.

 

Thanks for the interest is there anything esle i could do?

0 Kudos
Message 13 of 30
(3,667 Views)

Read my posts.

 

Read the manual.

 

As I previously posted....

The adresses at 200 and above define the analog output type (+/-5VDC, +/-10VDC, 4-20mA etc....)

 

 

I am sure the device does not have 3276 types, and so it is telling you that by it's timeout. I would expect the device to throw an exception code indicateing invalid data.

(03/0x03 Illegal Data Value) but I guess they were lazy, and are just ignoring the write request.

 

Check the manual for valid range on the output type. 

 

0 Kudos
Message 14 of 30
(3,656 Views)
I would expect the device to throw an exception code indicateing invalid data.
(03/0x03 Illegal Data Value) but I guess they were lazy, and are just ignoring the write request.

 This is a red herring. Modbus has no knowledge of the significance of any data to the slave / or application.

 

In any case the exception codes returned are vital in figuring out what is wrong.

0 Kudos
Message 15 of 30
(3,644 Views)

Hi S1ack,

 

The valid output range is:  0 ~ 20 mA, 4 ~ 20mA, ±10 V with Output Type mA,V

The digital input level is logic level 0: +1V logic level 1:10V-30VDC.

From the manual i have read through i cant make out what command to put in for the registers?

 

I apologise if i keep asking stupid questions, but i thought that +32678 was +10V that is why i entered 3268 for +1V my understanding isnt great. All i want to do is set my voltage supply, do i use the read holding registers function at address 200? what value do i put in my register? Or do i use a write multipe function. Thank you very much for your patience

 

Damien

 

 

 

 

0 Kudos
Message 16 of 30
(3,643 Views)

Guessing....

For the output type: Write...

0 = 0-20ma

1 = 4-20ma

2 = +/10VDC

(Manual should detail this if it does not call Advantech)

To the registers 200 + for each channel....

 

For the values (desired output magnitude) write:

A modbus register is a 16 bit INT.

Typical industrial Analog I/O would maximize the counts available to the range, which is why I suggest +/- 32767 = +/10ma.

(Manual should detail this if it does not call Advantech)

To the registers 40001 + for each channel....

Message 17 of 30
(3,636 Views)

Thank you very much for your help. I have contacted Advantech so waiting for a reply. So to write a voltage value to a single register I input 2 (+/-10VDC)  for channel address and 202 for the holding register? And to write the value of say 5V type in 6554 in address 40001?

 

Thanks S1ack

 

 

0 Kudos
Message 18 of 30
(3,632 Views)

Hello Damien,

 

Please reply when you hear back from Advantech. This should clarify exactly how you need to write the voltages and we will be able to offer further support if you are still experiencing the above errors.

 

Regards

Jamie Jones
Applications Engineer
National Instruments
0 Kudos
Message 19 of 30
(3,613 Views)

Hi Jamie_J the response i got from advantech is as follows:

 

To set any value in any register it depends on Labview how to do it ..here I can’t help you

Which register you need to use in our Modules it is easy and you have to option.

You use our ADAM/APAX utility and configure the module for Modbus use before and then you will see the Modbus register in the utility

The second option is to use our Manual and to refer to the register mentioned there ( after changing module to Modbus ).

 

So im still stuck where i was at the beginning, i used the ADAM utility to set the module to modbus> I have attached picures of the ADAM utility I have set the ADAM 4024 to modbus but the M does not appear even though it states modbus in the field.

 

I do not know what to enter into the fields to control my adam. I am looking to apply a value to my power supply. So the register i need the address and the value i am unsure of. Thank you for your help.

 

Download All
0 Kudos
Message 20 of 30
(3,605 Views)