Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Network Variable Setting ON Raspberry PI [Problem]

drsumruay
2019-03-07
2019-03-17
  • drsumruay - 2019-03-07

    Hi,
    Can anyone guide me how to browse the GVL file on Raspberry Pi?
    OR
    IF you have another way to implement the network variable on Raspberry Pi Please guide me.

    Thank you.

    IMG: Untitled.png

     
  • omeo - 2019-03-07

    Hi
    Usually I create two devices in a project to select the NVL Sender, as follows.

    You can also export GVL files in Link To File in the Sender side of Properties.

    They all need to set the received IP address and port in NVL_Sender.
    You can also download this official example.
    https://store.codesys.com/network-variables.html m

    IMG: Bild

    IMG: Bild

     
  • drsumruay - 2019-03-07

    Thank you for your reply,
    omeo
    I'm confused that you mean my Codesys IDE is on window10 and my target device is Raspberry PI so I can still use the path of GVL file on Codesys IDE window10?
    OR
    Should I change the path of GVL file to path on Raspberry PI?
    < ex: home/pi/myapp/myapp.GVL >

     
  • omeo - 2019-03-08

    drsumruay hat geschrieben:
    Thank you for your reply,
    omeo
    I'm confused that you mean my Codesys IDE is on window10 and my target device is Raspberry PI so I can still use the path of GVL file on Codesys IDE window10?
    OR
    Should I change the path of GVL file to path on Raspberry PI?
    < ex: home/pi/myapp/myapp.GVL >

    Hi
    Just select the *.GVL file in the IDE on win10, and the Raspberry Pi only runs the compiled PLC.
    Once created, this file is generally not easy to modify again (requires compilation), so I recommend creating multiple devices in a project so that you can freely choose the sender of the network variable.

     
  • drsumruay - 2019-03-10

    Thanks, your answer is so useful,

    IF I create C# application to create GVL File instead create by Codesys App, It's still working?
    Now, I can sending data from Codesys to my C# application but I can't recieve data from C# application from GVL file

    Best regards,

     
  • drsumruay - 2019-03-11

    Edwin Schwellinger hat geschrieben:
    Hi,
    are your netvars aproach based on this?
    https://sourceforge.net/projects/easynetvars/
    BR
    Edwin

    Yes,
    Edwin

    I follow this approach. Now, I can create GVL file on my raspberry PI but can't browse my GVL file path on Raspberry PI in Codesys project

    I confused on how the Codesys receive data from C# between via GVL file or UDP network.

    IMG: Untitled3.png

    IMG: Untitled2.png

     
  • eschwellinger

    eschwellinger - 2019-03-11

    hm.. this is not possible.
    I would recommend to add a second plc (dummy which is not used except for adding your c# nvl senderlist) -
    in your project.
    In this example here:
    https://store.codesys.com/codesys-senso ... droid.html
    this is the same.
    There is a Control Win with a NVL list which represents the NVL which is send by the Andoid device ( in your case it is coud c# app)
    The netvars are used by the Raspberry PI in the Project - this Control win in the upper application is only for generating this NVLlist, nothing else

    BR
    Edwin

     
  • drsumruay - 2019-03-11

    Edwin Schwellinger hat geschrieben:
    hm.. this is not possible.
    I would recommend to add a second plc (dummy which is not used except for adding your c# nvl senderlist) -
    in your project.
    In this example here:
    https://store.codesys.com/codesys-senso ... droid.html
    this is the same.
    There is a Control Win with a NVL list which represents the NVL which is send by the Andoid device ( in your case it is coud c# app)
    The netvars are used by the Raspberry PI in the Project - this Control win in the upper application is only for generating this NVLlist, nothing else
    BR
    Edwin

    Thanks,
    Edwin

    That's mean with this approach, I have to pay for Control win Runtime too?

     
  • eschwellinger

    eschwellinger - 2019-03-11

    No you do not even have to login to this plc,
    you just use it to configure the list..

    BR
    Edwin

     
  • drsumruay - 2019-03-17

    Edwin Schwellinger hat geschrieben:
    No you do not even have to login to this plc,
    you just use it to configure the list..
    BR
    Edwin

    Thanks Edwin
    It works for me

     

Log in to post a comment.