adccommunitymod (AutomationDirect) asked a question.

PLC with MQTT, Collaborative Task Scheduler, SD Card, and NTP functionality

Created Date: March 27,2020

Created By: SeaDragon

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

All, I got a P1AM earlier this week and have taken advantage of this whole Coronavirus to implement a project I 've been wanting to work on for a while: A controller for my aquarium! Right now, I 've got an Apex Neptune, which is a very costly, proprietary, "black-box " platform that leaves a lot to be desired in terms of integration capabilities. It's not even "programmable ", per `se, but can be configured for basic on/off timers (like a fancy sprinkler timer system.) I don't know how much I'll be able to work on this project after everything goes back to normal, but this should be more than enough to get people started with a collaborative task scheduler on the P1AM. I 've been able to easily get simple (non-blocking) tasks to run easily at 2ms intervals, as the TaskScheduler library is only taking ~12us of overhead for each pass! With the standard tasks running at 5ms, I'm able to run MQTT messaging at ~20ms intervals. Note that I'm not 100% sure if there are any blocking calls in the MQTT, SD, or NTP libraries, so I'd leave plenty of overhead for any network-stack related operations. https://github.com/JohnnyG89/SeaDragon Deuces, -JG


  • adccommunitymod (AutomationDirect)

    Created Date: March 27,2020

    Created by: SeaDragon

    All,

    I got a P1AM earlier this week and have taken advantage of this whole Coronavirus to implement a project I 've been wanting to work on for a while: A controller for my aquarium! Right now, I 've got an Apex Neptune, which is a very costly, proprietary, "black-box " platform that leaves a lot to be desired in terms of integration capabilities. It's not even "programmable ", per `se, but can be configured for basic on/off timers (like a fancy sprinkler timer system.)

    I don't know how much I'll be able to work on this project after everything goes back to normal, but this should be more than enough to get people started with a collaborative task scheduler on the P1AM. I 've been able to easily get simple (non-blocking) tasks to run easily at 2ms intervals, as the TaskScheduler library is only taking ~12us of overhead for each pass!

    With the standard tasks running at 5ms, I'm able to run MQTT messaging at ~20ms intervals. Note that I'm not 100% sure if there are any blocking calls in the MQTT, SD, or NTP libraries, so I'd leave plenty of overhead for any network-stack related operations.

    https://github.com/JohnnyG89/SeaDragon

    Deuces,

    -JG

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: April 07,2020

    Created by: SeaDragon

    New Revision!

    Includes a huge overhaul to the file structure so each of the tasks can run independently of one another.

    Same features.

    https://github.com/JohnnyG89/SeaDragon

  • adccommunitymod (AutomationDirect)

    Created Date: April 14,2020

    Created by: SeaDragon

    New pic of the P1AM in its "forever home "!

    Right below it is the Neptune Systems Apex Aquacontroller it's going to replace, and the IOT server is that thin client right inside the cabinet. To the right are the two remote IO modules from Neptune Systems.

    20200424_080810

    Expand Post