Skip to content

An example showing how to connect and communicate with a Radwag bargraph via RS232 using Json protocol.

Notifications You must be signed in to change notification settings

Radwag/RdgBargraphCommunication

Repository files navigation

RdgBargraphCommunication

Contributors Forks Stargazers Issues

An example showing how to connect and communicate with a Radwag bargraph via RS232 using Json protocol.

Technology

Project was written in Net Framework v4.8 with WPF, Project using System.Text.Json Version=7.0.0.0 liblary.

Working description

After entering the serial port name, you can manage the bargraph via json protocol.

image

Command structure

image

  • Content - object with all settings necessary to manage bargraph device.
    • Address - Address of device (default 255)
    • IsRequest -
    • Power - power of luminous segments
    • Red - a table containing the states of individual bargraph (Red)segments
    • Green - a table containing the states of individual bargraph (Green)segments
  • Crc - 8bit CRC

Commands

  • Set all red segments light on with power of light 70%
{"Content": {"Address": 255, "IsRequest": true, "Power":70, "Red": [1, 1, 1, 1, 1, 1, 1, 1, 1], "Green": [0, 0, 0, 0, 0, 0, 0, 0, 0]}, "Crc": "bf"}
  • Set all green segments light on with power of light 70%
{"Content": {"Address": 255, "IsRequest": true, "Power":70, "Red": [0, 0, 0, 0, 0, 0, 0, 0, 0], "Green": [1, 1, 1, 1, 1, 1, 1, 1, 1]}, "Crc": "bf"}
  • Set all segments light on with power of light 100%
{"Content": {"Address": 255, "IsRequest": true, "Power":100, "Red": [1, 1, 1, 1, 1, 1, 1, 1, 1], "Green": [1, 1, 1, 1, 1, 1, 1, 1, 1]}, "Crc": "bf"}
  • Set all segments light off with power of light 0%
{"Content": {"Address": 255, "IsRequest": true, "Power":0, "Red": [0, 0, 0, 0, 0, 0, 0, 0, 0], "Green": [0, 0, 0, 0, 0, 0, 0, 0, 0]}, "Crc": "bf"}

Installation

  1. Clone or download this repository.
  2. Open project in Visual Studio.
  3. Build and run.

About

An example showing how to connect and communicate with a Radwag bargraph via RS232 using Json protocol.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages