Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mesutonus

Pages: [1]
1
Support Questions / Re: How to Manage modbusRTUCom connection
« on: March 17, 2015, 04:49:44 PM »
great!

2
Support Questions / Re: How to Manage modbusRTUCom connection
« on: March 17, 2015, 04:47:10 PM »
After a short brainstorm it seemed impossible to manage. Because readings and writings are being made in short frequencies. So a reading request may interrupt an important write process.

3
Support Questions / Re: How to Manage modbusRTUCom connection
« on: March 17, 2015, 04:44:14 PM »
I use System.IO.SerialPort object  to write registers. And reading with advancedhmi.
So i need to keep only only object  alive during process.

4
Support Questions / How to Manage modbusRTUCom connection
« on: March 17, 2015, 04:30:16 PM »
Hello,

when calling read/write functions from ModbusRTUCom object it connects automatically. However i can not manage connection and close the port it opens.   
Could you please help?

5
Support Questions / Re: How to Write Multiple Register Inputs
« on: March 17, 2015, 04:28:00 PM »
Finally i made it. Thanks for kind support..

6
Support Questions / Re: How to Write Multiple Register Inputs
« on: March 16, 2015, 01:18:58 PM »
Spec document of the device.

7
Support Questions / Re: How to Write Multiple Register Inputs
« on: March 16, 2015, 01:14:14 PM »
Spec says ;

Coding System :  8 Binary bit hexadecimal 0...9,A....F.    Two hexadecimal char in each of 8 bit field of message.

8
Support Questions / Re: How to Write Multiple Register Inputs
« on: March 16, 2015, 12:41:12 PM »
But device returns signed int16 while reading registers?

9
Support Questions / Re: How to Write Multiple Register Inputs
« on: March 16, 2015, 12:35:55 PM »
Does component convert "111" to ushort when sending?

10
Support Questions / Re: How to Write Multiple Register Inputs
« on: March 16, 2015, 12:25:37 PM »
Ok but in which format?  Like

double doubleval =  75.5;

data =    Convert.ToUInt16(doubleval).toString()  ??

or its bytes? What about crc values? Will they be calculated by short values and then converted to string before sending or calculated on string vals?

May i ask if you can give a example for me for attached mapping?


11
Support Questions / Re: How to Write Multiple Register Inputs
« on: March 16, 2015, 12:15:32 PM »
When i read from device it returns  16 bit int array. I convert it to 32 bit, then to hex. After combining hex parts together i convert it to ulong number, then byte and then to double.   
So i think it expects   hex values in short format when i send.

I tried

data[0] = "hex val"
data[0]  = "Int16 val"
data[0] = "UInt16 val"
data[0] = "byte val"
...
..
all of possible combinations i know..

12
Support Questions / Re: How to Write Multiple Register Inputs
« on: March 16, 2015, 11:56:05 AM »
Sorry, written by mistake.

Function Code  : 16
Sub Function  Code : 2



modbusRTUCom1.Write("40001", datapack);  is what i do..

13
Support Questions / How to Write Multiple Register Inputs
« on: March 16, 2015, 11:37:08 AM »
Hi,

I am working on to control a device over modbus.  Reading is ok but i can not write multiple register inputs.

Device sends hex data as  short[]  array.   While writing, i did the same but i got exception  overflow.. 

I attached the spec page of the fuction.

Values should be :

Vega serial address  : 1
Sub Function code : 2 (0x02)
Meter addressed :  1
Product addressed : 1  ( 0x31)
Sub function code :  2 ( 0x02)
Preset :  95.5  ( any double value)
Max Weight :  100 ( any double value)
Reserved : 0 (0x00)

How can i populate this message?   I am trying for days. Already read all forums, blogs, everything..

Could anyone please help??



 

Pages: [1]