You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

CDP-Studio was used to make a dashboard to have a aoverveiw of the actual and target speed of the 8 motors, aswell the actual and target position of the end-effector. The PLC publishes these topics:

  • cabot/output/targetmotorspeed
  • cabot/output/actualmotorspeed
  • cabot/output/targetposition
  • cabot/output/actualposition

over MQTT. The problem is that the published string is on the format: "motorSpeed1, motorSpeed2, ..., motorSpeed3", this string needs to be parsed, this was done by using a python script to subscripe, then parse the string into 8 new publishes, the new publishes are unde the topics:

  • cabot/parsed/targetmotorspeed
  • cabot/parsed/actualmotorspeed
  • cabot/parsed/targetposition
  • cabot/parsed/actualposition

With a number behind the topic to indicate which indicate which motor it applies to. 


Ho have a MQTT broker run locally on the system mosquttio was used, its setup process is showcased in 24_7 Mosquitto setup. To setup a subscriber in CDP is quite simple. After creating a project, add a MQTTClient to the project. Within the MQTTClient some changes needs to be done before the subscriber works, the Broker host and port needs to be set to the correct settings, these should be 127.0.0.1(localhost) and 1883 respectivly.

  • No labels