Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Calling a function with foxtools.fll
Hi all!
I have a question.
Im acessing a 16bit .dll file to read values from a PLC and have some problems the code is like this:
SET UDFPARMS TO value
SET DEFAULT TO C:\dbf\testapi
IF !"FOXTOOLS" $ SET("library")
SET LIBRARY TO (SYS(2004)+"FOXTOOLS")
lLoaded = .T.
ENDIF
perstr=''
Portpa = RegFn("PCDSetParameter","III","I","c:windows\system\promosvb.dll")
Porton = RegFn("PCDOpen","","I","c:\windows\system\promosvb.dll")
Stasjon= RegFn("PCDSetStation","I","","c\windows\system\promosvb.dll")
LesR=
RegFn("PCDReadRegister","IIC","I","c\windows\system\promosvb.dll")
per= CallFn(Portpa,1,19200,1)
per1=CallFn(Porton)
per3=CallFn(Stasjon,1)
per2=CallFn(LesR,500,1,perstr)
The PCDreadregister have the following parameters
integer adress =start adress off register in PLC
integer count =number off registers to read
long value =array with return values
I dont know how to return a valid value I have tried with
@ in "PCDReadRegister","II@C"
I have tried with @perstr then I got an error:
Param 2 wrong got R expected C??
If you know please help
Best regards
Per Simmersholm
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement