Remote-processing BASIC for the CX-10 Modbus Manual de usuario Pagina 52

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 84
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 51
BASIC PROGRAMMING GUIDE
2-43
PRINT #n,ID,16,
start register,length,data,data,data...
Where: n = modbus port number on board. This is usually 1 or 3 or both. Refer to your board manual.
Id = modbus ID of device you want to get data from
start register
=is start of modbus address you want to write to
length
= number of registers you will write to
data
= number information (integer or float, as appropriate to register) you wish to write.
Number of
data
elements must be the same as
length
and must all be included in the same line.
EXAMPLE
100 STRING 200,20 : $(0)="String" : B=PI*5
110 PRINT $(0),B,REGREAD(2)*.00215
>run
String 15.707963 0
For modbus read (query)
rem send out id, function number, address, length
70 print #3,id,fn,ad,le
For modbus write
rem print syntax is id, function, start register, length, data, ..
10 PRINT #3,11,16,4501,3,1,2,3
Vista de pagina 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 83 84

Comentarios a estos manuales

Sin comentarios