Advantech ADAM-6050 18-Channel Isolated Digital I/O Modbus TCP Module ADAM-6050-BE Scheda Tecnica

Codici prodotto
ADAM-6050-BE
Pagina di 272
105
Chapter 5  
5.6  Source Code of Java Applet Example
import Adam.ModBus.*; 
import java.awt.*; 
import java.awt.event.*; 
import java.applet.*; 
import java.io.*;
import java.lang.*; 
public class Adam6060 extends Applet { 
boolean isStandalone = false; 
String var0; 
Thread AdamPoilThread; 
String HostIP;
long ErrCnt = 0; 
boolean IsAdamRuning = false; 
ModBus Adam6060Connection;
Label Label1 = new Label();
myFramPanel palStatus = new myFramPanel (2); 
myFramPanel pal1 = new myFramPanel (3); 
myFramPanel pal2 = new myFramPanel (3); 
myFramPanel palAdamStatus = new myFramPanel (1);
Label labStartAddress = new Label("Start Address:"); 
TextField txtStartAddress = new TextField("1"); 
Label labCount = new Label("No. of coils to read(Max 128):");
TextField txtCount = new TextField("1"); 
Button btAdam6060 = new Button("Read Coils"); 
TextArea txtMsg = new TextArea("", 1, 10, 1);
Label labAdamStatusForDIO = new Label("Status : ");