TOP
SSV Software Systems Register  Register
Log in to check your private messages  Log in to check your private messages
Startseite FAQ Search Mitglieder Profile  Log in 
SSV Support-Forum
CAN unter Node-RED ...

 
Post new topic   Reply to topic    SSV-Forum Forum Index >>> RMG/941C
<<< Previous topic - Next topic >>>  
Display posts from previous:   
Author Message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 21.07.2021, 22:50    Post subject: CAN unter Node-RED ... Reply with quote

Hallo Forum.

Durch die SocketCAN-Schnittstelle lässt sich CAN auch direkt unter Node-RED nutzen. Einzelne CAN-Pakete lassen sich mit einem CAN Input Node empfangen und per CAN Output Node verschicken.



Um CAN und Node-RED zu nutzen, muss zuvor sowohl die node-red-App als auch die node-red-contrib-socketcan-App installiert werden. Die erforderliche Bitrate für das RMG/941C-CAN-Interface wird mit Hilfe des SSV/WebUI eingestellt.

Code:
{
  "timestamp": 1623682765400,
  "ext": false,
  "canid": 1,
  "dlc": 8,
  "rtr": false,
  "data": [67, 65, 78, 49, 50, 53, 107, 98]
}


Die jeweils empfangenen Daten werden vom CAN Input Node (socketcan-out) am Ausgang als JSON-Objekt mit einem Zeitstempel im Unix-Format (Unix Time Stamp) zur Verfügung gestellt.

Durch die node-red-contrib-socketcan-App wird neben dem CAN Input Node (socketcan-out) auch ein CAN Output Node (socketcan-in) installiert. Weitere Details - siehe:

https://flows.nodered.org/node/node-red-contrib-socketcan

VG KDW
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 21.07.2021, 23:01    Post subject: CAN-to-Modbus … Reply with quote

Hallo Forum.

Wird der CAN Input Node (socketcan-out) bzw. CAN Output Node (socketcan-in) unter Node-RED zusammen mit einem weiteren Protokoll-Node genutzt, entsteht ein „CAN-2-X“-Protokollkonverter. Die folgende Abbildung zeigt ein Beispiel für einen CAN-to-Modbus-Wandler:



Aus dem JSON-Objekt am Ausgang des SocketCAN-Input-Nodes (socketcan-out in der Abbildung) wird in einem Function Node (CAN2NUMBER) der Teil der CAN-Daten extrahiert, der anderen Systemen per Modbus-TCP zur Verfügung stellt werden soll. Die eigentliche Modbus-TCP-Schnittstelle für den Zugriff auf die CAN-Daten bildet der Modbus-Slave-Node auf der rechten Seite.

VG KDW
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> RMG/941C All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

SSV Software Systems GmbH

Dünenweg 5
30419 Hannover

Fon: +49(0)511  ·  40 000-0
Fax: +49(0)511  ·  40 000-40

sales@ssv-embedded.de


Impressum    ·    Datenschutz    ·    AGB

© 2023 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015