PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile (earlier versions)
→
[WM16] Delphi > Windev
[WM16] Delphi > Windev
Started by Philippe Gaudy, Jun., 07 2012 6:26 PM - No answer
Connect yourself…
Philippe Gaudy
#1
Registered member
3 messages
Posted on June, 07 2012 - 6:26 PM
Bonjour,
Je viens vous lancer un appel au secours, car après de nombreux essais et recherches dans la doc et sue le web, je ne trouve pas de réponse claire.
Je cherche à lire des entrées analogiques sur une carte d'acquisition PCS10 USB.
J’arrive bien à piloter la carte avec les DLL fournis, mais je n’arrive pas à relire les valeurs.
Ci-dessous le code du fournisseur en Delphi, est-ce que quelqu'un peut me guider sur la conversion du code en Delphi en Windev.
D’avance un grand merci.
// ***********************************
ReadData
Syntax
PROCEDURE ReadData(Buffer:Pointer);
Parameter
Buffer: A pointer to the data array of 8 integers where the data will be read.
Description
Reads the timer counter status and the A/D data from the K8047 to a buffer in the application program. The timer counter is incremented every 10ms. The new data from the A/D converter channels 1...4 is updated every time the timer counter is incremented.
Data structure:
Timer data A/D converter data Reserved
LSB MSB CH1 CH2 CH3 CH4 0 0
Example
var // global variables
DataBuffer: ARRAY[0..7] OF Integer;
procedure TForm1.Button1Click(Sender: TObject);
var p:pointer;
i:integer;
s:string;
begin
p:=@DataBuffer; // Address of the data buffer
ReadData(p); // Read the data from K8047
memo1.clear;
s:='';
for i:=0 to 7 do s:=s +inttostr(DataBuffer[i]+chr(9);
memo1.lines.add(s); // Display the data
end;
// ***********************************
Report
0
0
→ Go back to WINDEV Mobile (earlier versions)
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
WEBDEV (earlier versions)
WINDEV Mobile (earlier versions)
Reports & Queries
Off-topic
Tools
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text