General information
Category:
Coding, syntax & commands
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only