Problem reading OPC data with MatrikonOPC Explorer

More
3 years 2 weeks ago #803 by tlerdrden
tlerdrden created the topic: Problem reading OPC data with MatrikonOPC Explorer
Hi Forum,

I have the ArduinoOPCServer v1.7 installed and I have tried to read some data with the MatrikonOPC Explorer, however, I haven't been able. Please, find the attached documents to view the errors. The code uploaded to my Arduino Yún is available at github:
#include <OPC.h>

/*
 * Declaring the OPC object
 */
OPCSerial aOPCSerial;

/*
 * We want to publish analogPin 3 to OPC Client
 */
int analogPin = 3;

/*
 * create a callback function for the OPCItem
 */
int callback(const char *itemID, const opcOperation opcOP, const int value){
  return analogRead(analogPin);
}

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();
}

What do you think about it? The OPC Explorer doesn't find any item, and the OPC Server returns "Error code 6, controlador no válido). I am using a virtual machine with Windows7 to do the tests.

Thanks,
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #804 by i.martinez
i.martinez replied the topic: Problem reading OPC data with MatrikonOPC Explorer
Seems you are using Serial port to connect to an Arduino YUN. Configure OPC Server for Arduino to connect to an ip address where Arduino YUN is listening

All the best
ilde

This is a free product. At the moment, I am not receiving any income or backup for this work. I have invested many hours investigating and programming. If you want to support this work, please, do it at:

PAYPAL: paypal.me/supportmywork

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #805 by tlerdrden
tlerdrden replied the topic: Problem reading OPC data with MatrikonOPC Explorer
Hi,
So... Can't I communicate my computer with the Arduino Yún over Serial? Just Ethernet? Do you have an example? Your sketch doesn't set any IP address to the Arduino Yun...

Please Log in or Create an account to join the conversation.

More
3 years 2 weeks ago #806 by i.martinez
i.martinez replied the topic: Problem reading OPC data with MatrikonOPC Explorer
To start you can take a look at:

www.st4makers.com/arduino-opc-server/ins...ch-using-arduino-yun

and use this version of OPC Server for Arduino at

www.st4makers.com/installation-related-i...s/204-opc-server#761

When you are going to configure it you can set the ip address of the YUN at the OPC Server instead the stech
All the best
ilde

This is a free product. At the moment, I am not receiving any income or backup for this work. I have invested many hours investigating and programming. If you want to support this work, please, do it at:

PAYPAL: paypal.me/supportmywork

Please Log in or Create an account to join the conversation.