09-06-2008 09:52 AM - edited 09-06-2008 10:00 AM
The modbus value is a single register that is a 16 bit word. It will have values from 0 to 65535. Each of your fields has a range defined. For type K it is 0 to 1370degC. For the voltages, it is -10 to +10 V. All you have to do is rescale the value in the 0 to 65535 range to a value in the 0 to 1370 deg C range. Divide the value of 1091 by 65535 and multiply by 1370, you get 22.8.
For a voltage, divide by 65535, mulitply by 20 and subtract 10.
09-06-2008 12:49 PM
Thanks sir,
I understand all description.what is calculations for mA?how do we decide it for different instrument?how do u know all ranges?
09-06-2008 05:19 PM
You're welcome.
It's just simple math to rescale a value. For 4-20 mA, you would multiply by 16 (range) and add 4 (the offset). The ranges are showing up for each channel in the bitmap images you posted.
I am attaching a VI (LV8.5) I have used frequently as a subVI in a program. This will let you rescale any value based on one range to its corresponding value in another range.
09-10-2008 11:03 AM
09-10-2008 02:25 PM
09-11-2008 01:28 AM
hello Sir,
I am sending u attachment vi for digital output communication.
09-11-2008 06:14 AM
When I opened your vi, the modbus command was set to write single coil. The address was set to 0. The quantity field was set to 8 and you have four databits wired to the command discrete input.
With four databits wired, you should probably be using the write multiple coils modbus command. The quantity should be set to 4. The address field should be set to 17 to turn on the outputs. Look at the advantech manual for the 4055 module. The address data is listed below. You really should not be able to write coils to address 00001-00008 as these are the digital inputs. I would still use portmon to reverse engineer the data stream sent by the advantech software when used with the 4055. Then see what the labview software is sending. Reverse engineering the hex datastream will really help you figure out the modbus protocol.
7. ADAM-4055 16-channel Isolated Digital I/O with LED
Module
ADDR 0X Channel Item Attribute Memo
00001 0 DI Input Signal R
00002 1 DI Input Signal R
00003 2 DI Input Signal R
00004 3 DI Input Signal R
00005 4 DI Input Signal R
00006 5 DI Input Signal R
00007 6 DI Input Signal R
00008 7 DI Input Signal R
00017 0 DO Output Value R/W
00018 1 DO Output Value R/W
00019 2 DO Output Value R/W
00020 3 DO Output Value R/W
00021 4 DO Output Value R/W
00022 5 DO Output Value R/W
00023 6 DO Output Value R/W
00024 7 DO Output Value R/W
09-18-2008 07:00 AM
Hello Sir,
I am using energy meter device (EM 6400)under which using active power having address 43903.how could i acces input of energy meter in Labview?i am sending u vi.
01-16-2009 05:00 AM - edited 01-16-2009 05:02 AM
Dear Sir,
In my application, using analog,input,output and digital input,output.How do i give analog output to adam card 4024?
when i access analog input value divide it by 65535 and do some calculation as per range.does it do for analog output ?
Reply me as early as possible
01-16-2009 09:48 AM
Don't mark your last question as the solution to your problem. You can unmark it the same way you marked it, from the menu on the upper right side of the message.
Have you tried doing the exact opposite as you did for analog input? Take your value, multiply by 65535 and write that to the card.