Nick Clute

MrPLC Member
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Nick Clute

  • Rank
    Sparky
  • Birthday 05/21/83

Contact Methods

  • Website URL http://

Profile Information

  • Gender Male
  • Location Flint, MI
  • Country United States

Recent Profile Visitors

1726 profile views
  1. Current Date

    Hello, It will depend on what has been enabled with the CoDeSys runtime that was implemented on the hardware you are using, however if enabled you can use a library called SysLibRTC.lib to be able to get the time from the internal Real Time Clock (SysRTCGetTime), or use SysRTCSetTime to set the time of the Real Time Clock. Also, I'm not sure if it was developed for Turck or not, but we use a library called SNTPTime.lib which enables communication with an SNTP time server. Hope it helps! Nick
  2. BL20

    I've heard of something similar, I seem to recall that sometimes it was traffic related. Something else was communicating over the Ethernet port which was taking priority. If you have a PLC or HMI communicating to the device try to disconnect that before doing a boot project download. Nick
  3. Well, all the "DT" variable is is the number of seconds since 1970. This means by using simple division you should be able to come up with each one of your variable outputs. DT / number of seconds in a year = Number of years Then you take the remainder of that division and divide it to get months MOD(DT / Number Seconds in a year) / Number Seconds in a month = Number of Months And so on.... Since there would be quite a few calculations that won't change most of the day, depending on what hardware platform you're using you may want to use a simplified timer to make sure you don't recalculate the year/month/date every single scan of the PLC. Hope it helps! Nick
  4. Is there such a thing as small CoDeSys PLC?

    I've only ever used the Turck Programmable gateways, they come in both inside the panel and outside the panel versions, both modular IO systems. They are the BL67 and the BL20. Lists in the US for around £420...
  5. Making a function block on TWINCAT

    Hopefully my answer will help, as I have only ever used the Turck Programmable Gateways so not sure if everything is exactly the same. However, if you're trying to create a function block to be used over and over again you have 2 choices. You can export it as an export file and then you can import it every time you need it, or you can create a library file that you can include in your project every time. The biggest difference between these two options is that by doing an export, the function block will always show up in your project list with the rest of the programs functions. If you create a library, the function will be "hidden" unless you go to the library manager. Also, if you need the function block to be locked so another user cannot see the logic inside of it, you will need to create a password protected library. Creating an Export Take the any project you already have written, go to the Project Menu -> Export. Then select the function blocks you want to export, click ok, tell it where to save your exp files. Then you have exp files with the function blocks that can be imported in the same manner into other projects. If you ever need to change the export file, then you create a blank project, import the export file, change it, and re-export it. Creating a Library Create a project as you have with no PLC_PRG (no program blocks), create function blocks that you would like, and go to the file menu -> Save As. Then change the "Save As Type" to "Internal Library .lib". Then when you want to re-use the library, you would go to the "Resources" tab and open the "Library Manager". Right click on the libarary list and "Add Additional Library". Then browse to your newly created library and you'll have access to the function blocks and they will not show up in the project browser. If you need to password protect your library, then you set a password in the Project Menu -> Options -> Passwords when you create your library. If you ever need to change your library, then you can by going to file -> Open -> Then change the "Open as type" to library and browse to your library. Hope this helps!!
  6. BL67/BL20

    Welcome to MrPLC Graeme! Currently there are no system variables provided, but they are considering adding some. Would you have suggestions as to what they should add?
  7. Ramp / Soak

    Joe, Yes, there is a ramp function within CoDeSys. It is located within the Utilities Library provided with CoDeSys. The file is called Util.lib
  8. Turck Programmable Gateways

    Chaca, I've been working with these units for a while, and the best thing I can tell you is that if you are interested in the programming environment, you can download CoDeSys off of Turck's website for free. There you can also download the datasheet for them. Do you have any specific questions about them? Nick
  9. Pretty sure that means that the bit that it is referring to is evaluated as a one shot somewhere else in the program. So if you have a OSR somewhere in the program setting a bit, whenever that bit is referenced elsewhere it reminds you that it gets set for one scan.
  10. ST FB - Syntax for Calling Instructions

    Scott, Thanks! That was exactly what I needed! what PP offered was good, however it was in ladder when I needed the ST. I almost didn't understand what you meant until I saw you attached an example. I find it strange that it will only work once you declare an array, but it doesn't need to be a large array, just any array. Oh well, as long as we know that it works, thats all that matters. Thanks everybody for your input! I'm sure I'll have more questions as I continue on (including acyclic telegrams over Profibus) Nick
  11. Question regarding choice of remote I/O

    I don't know if you require using Omron specific remote IO, and I didn't hear if you liked any fieldbus in particular, but recently I started using Turck's BL67 platform and I like it a lot. They have Profibus and DeviceNet stations, however they also have just straight Ethernet stations that could connect directly to the overhead system instead of running it through a plc...and for any internal logic if you wanted to do some small logic, they have a programmable gateway that is controlled with an IEC 61131-3 language...*shrug* I also liked it because it's IP67, so no cabinet required...
  12. ST FB - Syntax for Calling Instructions

    I can, but really it was just the one line that I posted...here is the corresponding ladder. And here is where I call that FB... As you can see, doing it this way it will pass the address into the FB, and I can increment it from there...just trying to find out similar ways to do this with ST, since a lot of my other functionality will be easier with ST.
  13. ST FB - Syntax for Calling Instructions

    I am familiar with pointers, and I understand what COLL is doing. Here is what I need to do specifically: Have an input to a FB be the address of my Profibus Node: CIO3300. Based on that input, I want to read the rest of the node information (30 bytes worth). The only way to pass the actual address and not the information for the address, either needs to be an array in-out variable, or an internal variable with AT settings. From what I've read, you cannot change the internal variable AT settings dynamically, so this is out. If I create and In-Out variable, it will pass the address for use in COLL. Doing as you suggest, I declared is as an array with length 2. I gave the input 499, and wrote Result := DWORD_TO_WORD(Input_Address[1]); So my result should equal the value in address 500, alas, it does not. So if I missed something in your post, please let me know. Thanks!
  14. ST FB - Syntax for Calling Instructions

    Has anybody used CX-P V7 with the Function blocks and ST programming and found out how to write an instructions like COLL? I'm trying to write a function block that needs to have an address passed into it and pulling data from the next few words so using the offset function would be the easiest that I can tell. Any thoughts?