|
-
Jun 4th, 2003, 02:55 AM
#1
Thread Starter
New Member
How to receive the value of the pressure sensor
Dear all,
I have a problem how to write a program in Visual Basic Application.
I have a pressure sensor and in the specification of this sensor, there are the rs485,rs232, the addresse and the function.
The addresse is NR1 = 250
The function are
1. Function F48(DeviceAddr: Byte; val class, Group, Year, Week, Buffer, State:Byte): Integer;stdcall;export;
2. Function F66(DeviceAddr: NewAddr:Byte): Integer;stdcall;export;
3.Function F69(DeviceAdd: Byte;var SN:Longint):Integer;stdcall;export;
4. Function F73(DeviceAddr,Channel:Byte; var Value:Single; var Stat: Byte): Integer;stdcall;export;
5.Function F95(DeviceAddr, Cmd:Byte): Integer;stdcall;export;
I have written the program to open and close the serial port but I can not write the program , how to receive the value of this capteur. For example: in the sensor, it displays 10 bar and I would like to read and receive this value and then I put it in the excel. The probelem is , how to write the program and what kind of function I have to use so that I can receive the value of the sensor.
Could you help me please, because It is very urgent for my project.
thank you very much for your kind attention and I am looking forward to hearing from you.
bunadi
[email protected]
-
Jun 4th, 2003, 04:45 AM
#2
Frenzied Member
In VBA? They only let you out once a year, right?
Maybe you should get some magic coding fairy dust.
-
Jun 15th, 2003, 01:00 PM
#3
New Member
is this value coming directly from your DCS? if your dealing with process data i don't recommend using Access. if your pulling this information from your data historian, depending on the amount of data Access is sometimes ok, however i suggest using SQL Server. i'm not sure if i'm understanding you correctly, but if the information is coming from your data historian, set up a tag in your data historian to make this decision for you. if you ultimately want this data in excel, i'd suggest working from that end. you can write a procedure in excel VBA to grab this data and then use the task scheduler to automate this.
-
Jun 15th, 2003, 03:19 PM
#4
Hyperactive Member
I got to play with a series of different telephone sensors several years ago and a key "discovery"
in the sequence was setting the correct COM-port baud rate. Until I stepped it way down into
the 600, 1200 and 2400 bps range, it had seemed as if nothing was being transmitted from the
sensor. Perhaps it might help if you check that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|