• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    UniPi Neuron and Variable Retain, WiFi, Bluetooth

    Scheduled Pinned Locked Moved CODESYS
    2 Posts 2 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mikeardy
      last edited by

      Hi,
      I need to know if there are possibilities to:

      • Enable some variables to be retainable and maintain their value in case of power outage

      • If is possible and how to use WiFi and/or bluetooth wireless connectivity

      Thanks at all

      1 Reply Last reply
      Reply Quote 0
      • D
        DavidCozens
        last edited by

        Hi Mike,

        This has been an on-going topic for CODESYS on the Raspberry Pi. The Raspberry Pi does not have non-volatile RAM, and so the built in PERSISTENT and RETAIN variables within IEC61131 do not function. The neatest solution I have seen is discussed in this forum posthttps://forum.codesys.com/viewtopic.php?t=5722 where 3S have provided some sample code that can write retain variables to a file on demand and then restore at power up.

        Be careful about writing too frequently to the SDCard as you increase the chance of file system corruption if the power is interrupted whilst writing.

        Regarding wifi, CODESYS relays on the underlying Raspbian configuration. So yes you can enable WiFi and it will work. There is a discussion on how to do this on the UniPi forum https://forum.unipi.technology/topic/438/wifi-instead-nic-mervis the process is the same.

        I have no experience of using Bluetooth with CODESYS. I suggest contacting 3S or using the CODESYS forum.

        regards David

        1 Reply Last reply
        Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post