SM_8RELAY relay numbering in OpenPLC v3


  • I have been working on coming up with ways to keep using OpenPLC.  The current work around is a library that I have created with SM_16DIN, SM4REL4IN, SM_8RELAY, SM_HOME, SM_INDUSTRIAL, and SM_RTD

    They all are numbered just like they are in OpenPLC V3 and work with the new STRUC++ editor so you can use the simulator with much larger memory capacity. It has been working to output a program to the v3 end points.  

    One place I am running into is the numbering of the relays for SM_8RELAY the STRUC++ editor hates the leading 0 that is in each of the relay locations.  What I have been doing is I have them labeled R1.....R8.  Then I compile the project, and go into the .st file and change the R1 to 01 through all 8 relays.  

    Is there a way to change the relay numbering from 01...08 to something without a leading zero ? 

    Ill drop the library into a GitHub and share it.  There is also a guy on the OpenPLC forum that has gotten individual boards to work with v4 runtime, I believe at the moment it will only go with a single board, and not a stack.

     

    Thanks!!



  • Hi Jake,

    Thank you for doing that.

    I made the v3 libraries a long time ago, but I am not sure I understand what you are asking. Could you give me more details?

    Alex.


  • OK i opened it up in VSC and realized the identifications for the relays are the letter O and not zero.  

    I have it closer to working now....It will load on the v3 runtime, I have another issue that I am running down.  I have updated the library to the letter instead of number.  

    I thought the relay board outputs were zero and the relay number, which the editor would not allow me to use a leading zero.  It would automatically put an underscore in front of the zero.  The font that is used in VSC has the zeros slashed out.  

    Ill post the link to the library once I know that all the boards I have in there will work, and ill add the rest of the boards soon


Please login to reply to this topic!