17 pgmⅢ programmable ethernet control system – CREATOR CR-PGMIII User Manual

Page 24

Advertising
background image

CREATOR CHINA 2011-03

WWW.CREATOR1997.COM

17

PGMⅢ Programmable Ethernet Control System

voltage/100.00
DATA_EVENT(mcar,2)

{

ONDATA()
{

double

tt

=

BYTES_TO_INT(DATA.Data)/100.0 //when using
SEND_QACAR to send the request, it triggers
here.

SEND_COM(COM,1,DOUBLE_TO_STRING(tt));

}

}

SEND_ACAR

void SEND_ACAR(String dev,int channel,int val)

Function: control the voltage output of the
Conversion Card.

Parameters:

dev

-

Conversion

Card

Device

channel

-

Device’s

Channel

number

val - :Analog Value (Notice: read value according
the actual external equipment. The general value
reading range is -12V ~ 12v in double type.)

Example:
acar_L = L:7:ACAR:192.168.1.20; //Define ACAR
Device

with

CRLINK(CAN)

number

of

7

SEND_ACAR(

acar_L,1,-12);//

Send Analog

Value -12 to lilt_L’s first channel. i.e., set the
Converter Card’s output to -12V.

Advertising