Добро пожаловать, Гость. Пожалуйста, войдите или зарегистрируйтесь.
Не получили письмо с кодом активации?

Официальный форум Simple-Scada.

Просмотр сообщений

В этом разделе можно просмотреть все сообщения, сделанные этим пользователем.


Сообщения - Ilya

Страницы: [1]
1
Я все еще не понимаю, почему у меня не работает. Помогите, пожалуйста. Хелп :'(

2
Senpai, проделал все еще раз, запустив от имени администратора. Ошибка та же самая. При запуске "Editor" от имени администратора, сервер не пишет никакую реакцию.В "Debug and information window" пишет "Неверный дескриптор"
     Попробовал снова без режима администратора, на этот раз сервер отреагировал следующим образом:
Код
01.06.2016 17:01:16 > Connected client 
01.06.2016 17:01:16 > Trying to open COM5 port
01.06.2016 17:01:16 > COM5 port open
01.06.2016 17:01:16 > Trying to open COM5 port
01.06.2016 17:01:16 > COM5 port open
01.06.2016 17:01:17 > Asking for available OPCItems from ArduinoSerial0
01.06.2016 17:01:17 > Trying to close COM5 port
01.06.2016 17:01:17 > COM5 port closed
01.06.2016 17:01:17 > Trying to close COM5 port
01.06.2016 17:01:17 > COM5 port closed
01.06.2016 17:01:17 > Disconnected client Simple-Editor DA Clien

Стоит добавить, что использую Arduno Mega. При компилировании появляются ошибки, но скетч все равно загружается. Приведу код ниже,  если вдруг поможет
Код
In file included from C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:6:0,

                 from C:\Users\Р?лья\Documents\Arduino\libraries\OPC\examples\UNOLed\UNOLed.ino:1:

C:\Program Files (x86)\Arduino\libraries\Bridge\src/YunServer.h:24:2: warning: #warning "The use of YunServer is deprecated. Use BridgeServer instead!" [-Wcpp]

 #warning "The use of YunServer is deprecated. Use BridgeServer instead!"

  ^

In file included from C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:7:0,

                 from C:\Users\Р?лья\Documents\Arduino\libraries\OPC\examples\UNOLed\UNOLed.ino:1:

C:\Program Files (x86)\Arduino\libraries\Bridge\src/YunClient.h:24:2: warning: #warning "The use of YunClient is deprecated. Use BridgeClient instead!" [-Wcpp]

 #warning "The use of YunClient is deprecated. Use BridgeClient instead!"

  ^

In file included from C:\Users\Р?лья\Documents\Arduino\libraries\OPC\examples\UNOLed\UNOLed.ino:1:0:

C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:19:1: warning: 'typedef' was ignored in this declaration [enabled by default]

 };

 ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:25:1: warning: 'typedef' was ignored in this declaration [enabled by default]

 };

 ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:30:1: warning: 'typedef' was ignored in this declaration [enabled by default]

 };

 ^

In file included from C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:6:0,

                 from C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:1:

C:\Program Files (x86)\Arduino\libraries\Bridge\src/YunServer.h:24:2: warning: #warning "The use of YunServer is deprecated. Use BridgeServer instead!" [-Wcpp]

 #warning "The use of YunServer is deprecated. Use BridgeServer instead!"

  ^

In file included from C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:7:0,

                 from C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:1:

C:\Program Files (x86)\Arduino\libraries\Bridge\src/YunClient.h:24:2: warning: #warning "The use of YunClient is deprecated. Use BridgeClient instead!" [-Wcpp]

 #warning "The use of YunClient is deprecated. Use BridgeClient instead!"

  ^

In file included from C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:1:0:

C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:19:1: warning: 'typedef' was ignored in this declaration [enabled by default]

 };

 ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:25:1: warning: 'typedef' was ignored in this declaration [enabled by default]

 };

 ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src/OPC.h:30:1: warning: 'typedef' was ignored in this declaration [enabled by default]

 };

 ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp: In member function 'void OPCSerial::processOPCCommands()':

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:105:89: warning: converting to non-pointer type 'byte {aka unsigned char}' from NULL [-Wconversion-null]

                       Serial.println(byte_callback(OPCItemList[i].itemID,opc_opread,NULL));

                                                                                         ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:109:88: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]

                       Serial.println(int_callback(OPCItemList[i].itemID,opc_opread,NULL));

                                                                                        ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:113:90: warning: converting to non-pointer type 'float' from NULL [-Wconversion-null]

                       Serial.println(float_callback(OPCItemList[i].itemID,opc_opread,NULL));

                                                                                          ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp: In member function 'void OPCNet::processOPCCommands()':

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:237:93: warning: converting to non-pointer type 'byte {aka unsigned char}' from NULL [-Wconversion-null]

                             client.print(byte_callback(OPCItemList[i].itemID,opc_opread,NULL));

                                                                                             ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:241:92: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]

                             client.print(int_callback(OPCItemList[i].itemID,opc_opread,NULL));

                                                                                            ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:245:94: warning: converting to non-pointer type 'float' from NULL [-Wconversion-null]

                             client.print(float_callback(OPCItemList[i].itemID,opc_opread,NULL));

                                                                                              ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp: In member function 'void OPCEthernet::processClientCommand()':

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:387:79: warning: converting to non-pointer type 'byte {aka unsigned char}' from NULL [-Wconversion-null]

               client.print(byte_callback(OPCItemList[i].itemID,opc_opread,NULL));

                                                                               ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:391:78: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]

               client.print(int_callback(OPCItemList[i].itemID,opc_opread,NULL));

                                                                              ^

C:\Users\Илья\Documents\Arduino\libraries\OPC\src\OPC.cpp:395:80: warning: converting to non-pointer type 'float' from NULL [-Wconversion-null]

               client.print(float_callback(OPCItemList[i].itemID,opc_opread,NULL));

3
Спасибо за своевременный ответ. К сожалению, не смог ответить сразу. Я загружаю код из примеров блиотеки OPC "Uno LED". После установки компонентов OPC ситуация изменилась. Теперь ошибка: "Этот OPC сервер не содержит публичных тегов".

Сервер пишет следующее:

01.06.2016 11:21:12 > Connected client
01.06.2016 11:21:12 > Asking for available OPCItems from ArduinoSerial0
01.06.2016 11:21:13 > Disconnected client Simple-Editor DA Client

На всякий случай приложу код:
Код
#include <OPC.h>
#include <Bridge.h>
#include <Ethernet.h>
#include <SPI.h>

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

/*
 * set led status from OPC Client
 */
int ledPin = 13;

/*
 * create a callback function for the OPCItem
 */
bool callback(const char *itemID, const opcOperation opcOP, const bool value){
  static bool ledValue = false;
 
  /*
   * if operation is a write command from OPC Client
   */
  if (opcOP == opc_opwrite) {
    ledValue = value;
   
    if (ledValue) 
      digitalWrite(ledPin, HIGH);
    else
      digitalWrite(ledPin, LOW);
  }
  else
    /*
     * read the led status
     */
    return ledValue; 
}

void setup() {
  Serial.begin(9600);
 
  pinMode(ledPin, OUTPUT);
 
  /*
   * OPC Object initialization
   */
  aOPCSerial.setup(); 
 
  /*
   * led OPCItem declaration
   */
  aOPCSerial.addItem("led",opc_readwrite, opc_bool, callback);
}

void loop() {
  /*
   * OPC process commands
   */
  aOPCSerial.processOPCCommands();
}

4
Здравствуйте. Пробую выполнить управление лампочкой на ардуине посредством скады. Использую "OPC server for Arduino". В ардуино загружаю пример из библиотеки "OPC".
    Запускаю сервер, в Simple-Editor ищу opc сервер, пытаюсь импортировать переменные, но появляется ошибка "Ошибка при попытке подключиться к OPC серверу "ArduinoOPCServer.1" для чтения списка тегов". Подскажите пожалуйста, в чем причина

Страницы: [1]