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

Nurse call system

Ovitzik
2018-02-23
2018-03-01
  • Ovitzik - 2018-02-23

    Hi.
    I try to make one Nurse Call System.
    I have install Codesys (I hope all package) on laptop (Windows 10).
    I have make the Wi-Fi connection with RPi,it's work.
    I have Raspberry Pi3 B+touchescreen display 7' and USB 16 relayboard from Numato.(Raspbyan is instaled)
    I has set 15 inputs of GPIO to BOOL,mapping to GVL_IO,i have add Modbus to command relay (I have try to make mapping-> GPIO5 to relay1,GPOI6 to relay2....GPIO26 to relay26 but I don't know how).1-15 relay for door lamp ,relay 16 for alarm(Mute from touchscreen ''Anulare sonerie")
    I have make in Visualization mapping beetwen ROOM 1 and Color Variable-alarmstate.Build to check and 1 Error
    "Cannot convert type BOOL to type ANY_NUM." (Numeric function?)
    I have load library .
    I watch very much to almoust all YouTube tutorials.I'm a little autodidact.
    What I doing wrong,or missing there?
    Can anybody help me?
    Thankyou very much.

    IMG: Library.gif

    IMG: Modbus.gif

    IMG: Error on build 2

    IMG: Error on build.gif

     
  • josepmariarams - 2018-02-24

    Hi

    You are traying to assign a bool to a color. Try to assign the bool to toggle color, and the bixx will change between alarm color qnd normal color.

    Be healty!

     
  • Ovitzik - 2018-02-26

    Thank you.
    Without errors.
    Connected with device and run.In run mode,when I set False or True,in visualization don't change nothing.I set green on normal and red on alarm.Should not color change when I set false or true in run mode?
    All I have to do now is to assign (map)15 rooms to 15 relay wich is connected on USB to raspberry and make an application to run on raspberry.He'll have to start the boot alone.
    Now is now.I have read very much all weekend ,Help of Codesys,FAQ + tutorials.
    I hope to succeed.I will publish the project when it is functional.There will also be a bachelor's degree project.
    I will come back with success or other errors.
    Thanks again.

    IMG: Nurse Call project 2.gif

    IMG: Nurse Call project.gif

     
  • eschwellinger

    eschwellinger - 2018-02-26

    Hi,
    I would remove the device application... generate a new empty project without device application. Then copy the whole stuff from your old application to the new one and check if this solve the issue.
    BR
    Edwin

     
  • Lo5tNet - 2018-02-27

    From the pictures above you have not wrote the values to the controller. You need to do from the menu "Debug -> Write Values" or "Debug -> Force Values" in order to actually change the variables to TRUE or FALSE. If it works you will see under VALUE change and the PREPARED value get set to empty.

     
  • Ovitzik - 2018-03-01

    Hi.
    Thank you for your goodwill.
    I did update and dist-upgrade to RPi and reboot.Everything is up to date.
    I created an empty application.I've re-created everything new on the newly empty created application.
    No errors on build,no errors on login with Rpi.
    if I set "true" in GPIO, it's true in GVL_IO and vice versa is the same.Aplication is running.I have no error at "messages".
    I tried with both relay boards(see the picture with relayboards). The status on Modbus is the same with both relayboards.
    Modbus Slave is Not Running.
    I tried to change port (1-16) to both relayboards.What I did wrong?
    Do I need the Raspberry Relay Board Driver or codes for them?
    Green/White is Numato 16 USB relaboard and White/Blue is Sainsmart 16 USB relayboard.
    I haven`t active "debug->write values" function.
    Something I miss and I do not know what.

    IMG: Modbus_Master.gif

    IMG: GPIO.gif

    IMG: Relayboards.jpg

    IMG: Visualisation.gif

    IMG: Modbus_COM status.gif

    IMG: Modbus_COM general.gif

    IMG: Codesys_control_for_RPI

     
  • Ovitzik - 2018-03-01

    In lsusb on RPi I see the ralayboard.Bus 001 Device 004 like USB-Serial adapter

    IMG: lsusb.gif

     

Log in to post a comment.