PFC200 mit Microsoft Azure Cloud verbinden

tokamak

Level-1
Beiträge
4
Reaktionspunkte
1
Zuviel Werbung?
-> Hier kostenlos registrieren
Hallo Zusammen

ich versuche mein PFC200 IoT fähig zu machen. Ich will diesen mit der Azure Cloud verbinden. Leider kalppt das mit der Verbindung nicht so richtig.
Testweise habe ich folgende Anwendung mal testweise mit der Wagocloud verbunden und es hat funktioniert.

PROGRAM wagocloud
VAR
tSamleinterval : TIME:= T#5S;
tPublishInterval:TIME := T#10S;
var1:REAL;
var2:BOOL;

status: WagoAppCloud.FbStatus_WagoProtocol;


END_VAR


{attribute 'qualified_only'}
VAR_GLOBAL
(*FbcollectionLogger send data to azure*)
oFbCollectionLogger: WagoAppCloud.FbCollectionLogger;
aCollection : ARRAY [0..1] OF WagoAppCloud.typCollection;
aTagConfig : ARRAY [0..2] OF WagoAppCloud.typVariableDescription;

END_VAR

im plc_prg:

GVL_wagocloud.aTagConfig[0].pAddress := ADR(var1);
GVL_wagocloud.aTagConfig[0].eValueType := WagoAppCloud.VVT_REAL;
GVL_wagocloud.aTagConfig[0].sTag := 'CPU Temperatur';
GVL_wagocloud.aTagConfig[0].sUnit := '°C';


GVL_wagocloud.aTagConfig[1].pAddress := ADR(var2);
GVL_wagocloud.aTagConfig[1].eValueType := WagoAppCloud.VVT_BOOL;
GVL_wagocloud.aTagConfig[1].sTag := 'Lampa';
GVL_wagocloud.aTagConfig[1].sUnit := '';


GVL_wagocloud.aCollection[0].dwCollectionId := 0;
GVL_wagocloud.aCollection[0].sName:= 'Blog_test';
GVL_wagocloud.aCollection[0].pSampleInterval := ADR(tSamleinterval);
GVL_wagocloud.aCollection[0].pPublishInterval := ADR(tPublishInterval);
GVL_wagocloud.aCollection[0].pVariableDescriptions := ADR(GVL_wagocloud.aTagConfig);
GVL_wagocloud.aCollection[0].dwVariablesCount :=2;


GVL_wagocloud.oFbCollectionLogger(
pCollections := ADR(GVL_wagocloud.aCollection),
dwCollectionsCount :=1
);


status(xEnabled := TRUE);


var1 := var1+0.001;



jetzt möchte ich eben anstelle von der Wago cloud, an die Azure cloud senden.

in der wbm weiss ich nicht wie ich es einstellen muss.

Enabled klar auf True
Cloudplatform Azure
Hostname ? global.azure-devices-provisioning.net ? oder wo finde ich den?
Dvice ID bekommt man von der Azure wenn man ein Gerät erstellt und das einer Gerätevorlage hinzufügt.
Audentification ? SAS funktioniert bei den anderen geräten in meiner Azure.. daher würde ich das bevorzugen
Activation Key ? ist das der Primary Key oder secondary key oder etwas anderes?
data protocol ? schein nur wago handshake und 1.5 auswählbar zu sein.
use websockets ? ein oder aus?
use compression? ein oder aus?
cache mode ist klar, zwischenspeichern im ram oder auf der sd karte.
device info
device status?
standard commands?
application property template? wo finde ich das bei azure.

Ich verwende Azure IoT central und nicht Azure IoT Hub.. ich würde aber umsteigen wenn ich mit dem Hub eine Verbindung hinkriege.

muss ich eventuell den code anpassen um azure kompatibel zu sein?

der connection status:

[FONT=&quot]Connection 1[/FONT][FONT=&quot]Operation running

Data from PLC runtime : 1 collections

Cloud connection disconnected

Heartbeat 120 s

Telemetry data transmission enabled


Cache fill level (QoS 1 and 2) 4.46% (3311 samples)



[/FONT]


Gruss und danke für eure antworten.
 
Hallo tokamak,

grundsätzlich stellt sich mir erstmal die Fragen welches Protokoll du verwenden willst um Daten in die Cloud zu bekommen.
Ich weiß das die Cloud Plattform Azure im WBM des PFC aktuell nur das Wago Protokoll zulässt. Hier unterscheidet sich die Syntax
zu dem NativeMQTT Protokoll im e!COCKPIT Projekt.
In den Sample Projects des e!COCKPIT findest du in dem WagoAppCloud Ordner den
e!C_Anwendungshinweis_Cloud Connectivity.pdf. Im Kapitel 4.2.2 steht wie du
ein Gerät in der Azure Cloud anlegst und was du im WBM des PFC hinterlegen musst.
Ich habe dir unten mal einen Screenshot angefügt der die wichtigsten Schritte enthält.

4.2.2.3_Cloud_Connectivity_konfigurieren.jpg


Gruß
Pawe9319

 
Zurück
Oben