Jump to content

tmoulder

External Moderators
  • Posts

    196
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by tmoulder

  1. Notice: This is an example program, instead of an importable module. The way CanOpen is confgured in Unitronics makes an importable module for this impractical. The program is an example of communication with a Wago 750-307 IO node. The node I used to develop it has 16 digital inputs and 10 relay outputs. Refer to the documentation of the node to see how to set the Unit ID for the node, the program looks for node 1. I designed the NMT section of the program to mainly to handle automatic launch from Pre-Operational to Operational mode at power-up, and to recover if the node is disconnected. Error messages are checked against the error register to see if they are legit, and an alarm bit in the PLC is set if this is the case. Otherwise they are ignored. PDOs are not processed until the node is seen as operational in response to the Node Guard request. The 307 uses Node Guarding, and the scheme is designed around this. I noticed a change between Unitronics' processing of Node Guard signals (Toggle Bit no longer toggles, Received bit is triggered) in the latest OS, vs the previous one. It's actually an improvement, but I don't know if they will go back to the old method. It works with OS 3.3.3 on the 570. I hope you find it useful. If anybody can think of a good way to make it importable, please share! TM Wago 750_307 Module.vlp
  2. Somebody voted "buggy junk" above If anybody is having issues, I'm happy to help. Just post issues here. Thanks, TM
  3. This is a little Modbus routine I wrote to connect to one remote node, in my case a Dalsa IPD vision device. It's not designed to connect to several devices, just a one-to-one such as my camera setup, a single servo drive or VFD. As such, it is really optimized for maximum communication to that single device. The module reads the vector of addresses from the slave constantly, as fast as possible. Writes only take place when a value in the Tx Vector is changed. So the PLC always has the freshest possible data in the fastest possible manner. On the HMI Side, I collected about a dozen different status bits into two message objects, one for the Ethernet adapter and one for the socket. Special thanks go out to Ash Neilson, who was a tremendous help on getting the serial variation of this running last year. If you look at the source and find yourself wondering why there are two Socket 3 Busy bits, check out the conversation here: I hope you find it useful! TM Edit: forgot something, added rollover for the RHR / PHR counters and an error count.
  4. Thanks Damian, that gives me a good work-around. But I'd still like to examine the busy bit behavior a little further. The busy bit is designated in the Config FB, and thereafter is controlled by the operating system. Since the bit is turned off when the command is completed, asynchronous to the ladder, does it turn on immediately when a command is issued? I wonder if the value could be trapped somehow. Emil seems to hint at that earlier, if I understood correctly. Thanks again, TM
  5. Hi Emil, looks like we cross-posted. Yeah, I've used a TE timer in conjunction with the Busy bit before to debounce the display value. The problem is, in this scenario, the busy bit never comes on at all. This opens an interesting can of worms. If the busy bit never comes on, how can I use it to manage traffic? Thanks! TM
  6. I moved the subroutine call for the Modbus Send / Receive to the last net of the main program, so the config is at the start of the ladder and the Tx/Rx is at the end. This left very little time for the data exchange to finish before the config FB was rescanned. Lo and behold, the busy bit works now. Not sure how I feel about this - the impression given by looking at the screen indicators is that "busy status" is never achieved. It would be nice to have this latched on for a minimum of one ladder scan. On the other hand, with a 6mS scan time, this would have the effect of slowing communications, so - I don't know. Just a tidbit I discovered the hard way. Tim Moulder - extreme PLC programmer
  7. I've cooked up a little Modbus IP Master module, and it works like a champ as a stand-alone. After I import it into my program though, the Busy bit configured in the Modbus IP Config FB never turns on. It doesn't matter what bit I use. I cannot change the bit from Visilogic by set and reset, so something is governing it. Data-wise, it seems to be working just fine. After several tests, the only thing I can think of is the scan time. This is a very large program and it shows a 6 mS ladder scan. Since Ethernet is such a fast protocol, I'm thinking the entire data exchange may be finishing before the ladder rescans the IP Config block, and so the busy bit is never set. Is this a possiblity? Thanks, TM
  8. This would be particularly useful for protocol operations, like Modbus (where MI is the most efficient way to move things around) and CanOpen (where it's the only way to move things around).
  9. Has anyone seen this issue in the enhanced series controllers, or just the older 280s? I did a torture test on my 570 and it never missed a beat, but I don't have a 280 lying around to test. Thanks, TM
  10. Hi Ditchdigger, If you are using the built-in alarms, this might be too simple of an approach for your needs, but I wrote this module specifically so I could import and export alarms easily, and build a library of standard alarm strings. http://forum.unitronics.com/index.php?/blog/16/entry-44-simple-alarm-module/ Best of Luck, TM
  11. When I was experiencing this problem, it was a single DT Read, and a nice speed 6 mS scan time (speedy for a 280 anyway).
  12. Unitronics has provided us with a powerful and comprehensive alarm system built into the OS. It provides grouping, status conditions, and pre-made screens to interact with. It's a terrific piece of work, and I do not wish to detract from it one bit. That said, it's also complex and can be tricky to set up. The vast majority of my projects don't need anything that sophisticated. So after several years of working on my own technique, I finally came up with a module that matches just my needs, keeping it simple and sweet. The attached program is a simple alarm system. It uses the legacy Events FB, a string library to store text for alarms, and UTC date and time stamps. There are 12 entries on the screen, active alarms are highlighted in red, and go white when cleared, leaving a 12-point history behind. The Event Rise FB ensures that all alarms are captured, even if they occur simultaneously. This module in particular seems ripe for expansion. You could modify it to scroll and add more alarms to the history, and /or use Log to SD for long-term history. But as I said, those just aren't something I generally need. One limitation that comes to mind is that if more than 12 alarms occur at once, some will be knocked off the list and not visible. To which I say, if you have more than 12 alarms occurring simultaneously, you may have bigger problems than the length of the list Enjoy! TM
  13. Greetings all! This program has been floating around in a couple of forms since before Christmas. Essentially, it is a program to create a CSV file on an SD card, and incorporates a data table as a buffer to prevent data loss if the card is removed, or writes come in too fast. This latest revision includes logic to create column headings at the top of the spreadsheet automatically when a new file is created on the card. Instructions for use and importing into an existing project are in the Readme file in the zip archive. Enjoy! TM SD Card with Buffer Rev 2.zip
  14. tmoulder

    FOSS Logic

    Lately, I've been twiddling around with Linux, and learning about it's history. I've been extremely impressed by what a group of people can accomplish with some collaborative effort and a willingness to share that effort. I'm no PC programmer, but I am a PLC programmer, and over the years I've developed a number of importable code modules I use in my programs. In the spirit of shared effort, I'm going to make some of these modules available to the forum. These are modules I've personally used and extensively tested, but I make no guarantees about how they will work out for somebody else's application. I try to make them as general purpose as possible, given that I wrote them for my own needs. Lastly, in the spirit of Free and Open-Source Software, I ask that if you make a neat improvement to the module, share it back with the rest of us, so everyone can benefit from the spirit of collaboration. Thanks, TM
  15. Something I noticed while working on this: When choosing the filename in Write CSV, you give an 8-character name and choose the type separately. When using File Info though, it needs the name plus extension, with no option to choose file type. While I see the need to make this FB general-purpose, I had to devote alot of effort to generating a file name the File Info FB would recognize. Be nice to simplify this somehow, say by looking at the name only and not extension? Also, I tried to force an illegal value into my folder selection and check for an illegal folder before clearing the buffer. If it's somewhere in the OS, I didn't see it, but the File and Folder Info blocks did not update, and even with an illegal destination, reported no problems. Thanks, TM
  16. This is a revision to the buffered SD card subroutine I submitted before Christmas. It adds some new functionality (credit Stein Yair for explaining how the File Info FB operates), including file and folder selection, file and folder info, and a better layout of operands to make modification easier. It's free to all. Be sure to read the readme file for more detailed information, instructions for importing and use. Thanks, TM SD Card with Buffer Rev 1.zip
  17. Hi guys, I've said elsewhere that Visilogic's growth has been pretty organic, and could use some pruning. I second Damian's ideas, it's a pretty comprehensive list for improving the IDE. Also, I'll rehash one of my own: Add jump to HMI function to the button object as an option, and eliminate the links tab entirely. The Jump to HMI ladder function can handle jumps from within the program.
  18. It seems PNG is supported, but you have to type *.png into the file name of the open dialogue to bring it up.
  19. As stated in a previous thread, I have a 280 project where the data table is sporadically not being read out. I don't understand why it is not coming through, the code is very simple, but if I had a bit confirming the read took place, I could verify it. I can always add a column to the table, an MB set to "1", and reset the MB in ladder before reading. When the bit goes to "1", I know the read finished. But I thought a system bit would be better, since anything in the OS reduces my ladder overhead. Thanks, TM
  20. Greetings all, I would like to propose a couple of System Bits added to the OS - Data Table Read Success and Data Table Write Success. It doesn't matter what table was read, what data, or anything else, just that the last DT command executed successfully. Thanks, TM
  21. Hi R.Mozes, Only 4 displays, downloaded Visilogic brand new this morning. I can't post the project publicly, so I'll email it to you at support. Thanks, TM
  22. Hi guys, There seems to be a bug in the background images. If I put in a new image and choose to replace all occurences (same background in several screens) and cycle power, the power-up display has a black and white background with hebrew text on it. Changing screens after this results in each screen piling on top of the next, with no update to the background for any of them. If I change the background images individually, no problems Thanks, TM
  23. I noticed in the beta there is no provision for PNG files when selecting images? Are these no longer going to be supported? That would be a shame, since the quality is much better than jpg. Thanks, TM
  24. Hi All, Vision 280, latest OS and Visilogic 863. I'm using a data table for process parameters. All DT commands are manually triggered from the touchscreen. When I try to read from the DT, sometimes the read takes place, sometimes not. I've got an indicator on-screen that shows the net executing the DT Read has operated, but not data was read. Repeated presses of the touchscreen button will eventually make the read happen. Very bizarre. I could work around it with a latching arrangement, but I'd rather find a root cause. One thing I did differently in this application was grouping multiple data elements into single columns (Column 1 has three elements, A, B, C, all signed integers). I'm wondering if there is a relationship. Thanks, TM
×
×
  • Create New...