Hi,
I have installed the ArduinoOPCD v2.0 according to your instructions.
I have compiled and uploaded to an Arduino One Board the following code (I have a potentiometer Connected to the arduino A0):
———————————————————–Begion code————————————————————–
#include
/*
* Declaring the OPC object
*/
OPCSerial aOPCSerial;
/*
* We want to publish the value read by the potentiometer on A0 to OPC Client
*/
int potPin = 0;
/*
* create a callback function for the OPCItem
*/
int callback(const char *itemID, const opcOperation opcOP, const int value){
return analogRead(potPin);
}
void setup() {
Serial.begin(9600);
/*
* OPC Object initialization
*/
aOPCSerial.setup();
/*
* A0 OPCItem declaration
*/
aOPCSerial.addItem(“A0”,opc_read, opc_int, callback);
}
void loop() {
/*
* OPC process commands
*/
aOPCSerial.processOPCCommands();
Serial.println(analogRead(potPin));
delay(1000);
}
——————————————-End Code————————————————————–
The changes in the potPin are correctly displayed in the output window of the “Serial monitor” tool.
Using the OPC client “dOPC Explorer” I can correctly identify the tag and I can also see the value changing according to the variations in the potentiometer.
In the KEPserver EX Version 6.2.460.0 I succesfully added an OPC-DA channel to the ArduinoOPC-DA server.
My problem is that when I try to add a Device in the KEP, I do not see any available tags.
Any help would be appreciated.