Jump to content

C_R_PLC

Members
  • Content count

    36
  • Joined

  • Last visited

Everything posted by C_R_PLC

  1. Thank you very much, definitely very handy tools. I was in the process of trying to wrap my head around the links/jumps sections. This has very much been a good example of the more I learn the more I know I don't know lol
  2. For a little backstory I work for a small business that basically hired me to be their official tinkerer, they need it learned I learn it. So in my endeavors I had to learn PLC programming to make the program for a water recycling system for a laundromat. This was mostly done through YouTube and trial and error, which has led to me making programs that work for my purposes but I'm curious if I've developed any weird tendencies or bad habits in my little educational bubble. The project I'm adding here is part of the program and I think shows most of the things that I'm concerned I came up with "unique" solutions to, namely my use of set/reset and timers. If anyone could take a look and see what they think I am open to any and all critique. Thank you very much for your time, -Chris Don't mind some of my labeling, I wasn't sure what the technical name was so I used some very literal descriptions. SaS_Sensors_Alarms_Revised.vlp
  3. So I can only say from my personal experience but I found that going on YouTube and basically watching a ton of videos helped me the most. I started with the bare basics on relays and worked my way from there. My first bunch of videos were from here... https://www.youtube.com/user/plcprofessor/videos His earliest videos go very much into detail on the basics of relays and then goes up to programming in RSLogix500, which is obviously not Visilogic but the ideas carry over pretty well. You'll want to start with his Basics01-14 series, and then watch his PLC Lecture series from 01-12. Also take lots of notes because he moves at a pretty rapid pace and you'll definitely want to be looking back every now and then. After that you should probably head to the Visilogic YouTube page to get the specifics on how everything you just learned applies to Visilogic, namely their playlist on Visilogic Logic and Application. Found here... https://www.youtube.com/user/UnitronicsWebinars/playlists There are playlists for other more specific things that will definitely help you so I would say go to those for more specific questions. Your biggest tool past the basics however is the help/examples page in your actual Visilogic program, that will go very into detail about how things work and has answers for pretty much any question you can think of that isn't hardware based as long as you take the time to learn it. Past that it's just a ton of trial and error, and learning from every mistake you make. It helps a lot if you have a goal you're trying to accomplish which it sounds like you do but this step of the process took me a few months of like 6-8 hours a day of studying, so be prepared to put some work in. It may not take that long for a sloppy, bare-minimum type approach but I would say that should not be your goal. Hope this helps, -Chris
  4. I understand, thanks for taking the time to explain it. That whole notion of the compiler not necessarily doing what you expect it to never even crossed my mind. I just had the basic understanding that it read left to right and up to down, but even that's not really the compiler aspect of it.
  5. Ahh okay I see, I'll try and avoid doing that until I understand more how it affects the compilation process. But that logic is also much more straightforward than the storing that I was doing in mine so I could see why that is able to be combined as opposed to mine. In that example what is the purpose of SB 1? Wouldn't just a line from the left rail be enough to always have that powered?
  6. Ahh okay that's exactly what I meant by behind the curtain, I had no idea about the differences between compiled code and ladder logic. Will definitely fix those wherever I see them. I always feel weird asking for explanatory questions like that because I know it can come off as like disregarding the advice, definitely not how I meant it.
  7. Just as a follow up question would the attached picture count as placing multiple logic threads in a single ladder rung? And if it is what is the harm in something like this? I only ask because to me it looks neat this way but if there is a more behind the curtain reason not to do it then obviously that overrides looking nice lol
  8. Thank you so much for responding, sorry my own response was so slow. The job site I'm working at doesn't have very good internet and it just totally slipped my mind. Definitely will fix the multiple logic threads and the Main Routine parts, this program is the culmination of a few months of a lot of trial and error so the fresh eyes definitely helps. Hah well thank you very much, I can't imagine you'd look so fondly at my first few months of struggle but it's good to know that some of the things I noticed and learned from proved to be going in the right direction. As I said with Flex thank you very much for the response. Sorry for being late on my own side. The renaming Main thing and network comments definitely makes sense to me, I think that may have stemmed from me knowing I'd be the only one to ever look at it but it makes total sense that it's just as much there for me as anyone else reading it. I've definitely had times where even after a week or so of having to do other things I came back and had to basically relearn what I'd written. I hadn't even considered the Output idea, I think up till now where I'm a little bit more comfortable with everything I really needed to see the whole logic string together but moving forward I will definitely transition towards a more usable/troubleshooting friendly approach. Would you say the Display Control subroutine is similar to what I did with the Password Entry subroutine? Or should mine be split up more? Could you elaborate on the vertical line statement? You're referring to Rung 6 vs Rung 8 in the attached picture? I think mainly I'm just making sure I'm understanding what you mean by function block. As for the Links and Jumps I knew they existed but hadn't delved into using them at all, I'll definitely look into how to use those because I do like the idea of getting rid of some of that clutter. Things like that are kind of what prompted me to ask this because some parts of the code just seemed extra cluttered compared to others especially around like looping timer setups and things of that nature. The Set Reset method I used was discovered kind of by accident but I'll link an older program I made that was basically the PLC version of a laundry machine cycle that really gave me a headache trying to figure out. It's all in Subroutine 4 and honestly I'm not even sure if it works because I haven't gotten to test it yet, but it shows off the timer issue I was concerned about in the initial post really well I think. Thank you very much for the kind words, I think "this is not horrible code" is just about as good as I could ask for in all honesty so I'm happy to hear that. DoD Full Program V2.vlp
  9. As always Joe you are a savior for my mental stresses, that worked. I was copying the wiring I had for another sensor but a wire must be switched somewhere along the way that threw me off. Thank you!
  10. So after a lot of troubleshooting I'm officially out of ideas, so hopefully someone can see what I'm missing. My current set up is 2 4-20mA pressure sensors hooked up to the 2 analog inputs on the V350-35-r34. Wiring is + to PLC input, - to power supply 0v which is commoned with the PLC, ground to ground. The jumper setup is A A B B B from 1-5, so just the analog jumpers changed over. I have tested literally every aspect of this setup, both sensors are a complete loop when tested, the PLC reads correctly if I use a 4-20mA loop simulator, all the wires are intact, I've tested it at the minimum distance of the wires, I've used 2 different PLCs, I've quadruple checked the program and all of that setup. I have literally no idea what is wrong at this point. Is there anything else anyone can think of to test or troubleshoot with this?
  11. Title basically says the whole issue. I'm trying to get a usable reading from the sensor listed below, but it just seems to fluctuate between 2 and 3 volts even if nothing is plugged in. So my question is two-fold. Can I get a signal that is more precise than a whole number, and will that sensor even work with a PLC and if not is there anything I can get to interface the two? Sensor - https://www.dfrobot.com/wiki/index.php/Turbidity_sensor_SKU:_SEN0189 Thank you very much for your time/help.
  12. Could it have something to do with the setup that I'm using to power it? I have a variable voltage output powering the sensor itself because it has to be set to 5V, so the positive and negatives are coming from that machine instead of the PLC.
  13. Okay, sorry for the late response. New day new voltmeter approach. So with a voltmeter I get .756 volts when the sensor is clear and .950 volts when the sensor is covered.
  14. Ignore the second one, that was just me testing if it was the analog input itself, it's exactly the same.
  15. Direct reading through the MI that the analog input is going to. No matter what I do it only gives whole value readings of 1-4. I've checked all that a few times now, I'm just trying to test this sensor so there isn't much actual logic involved. Jumpers are all correct and all that.
  16. So after a bunch of trial and error I'm happy to say I've made some good progress on teaching myself how to program decently complex things, but a few things elude me so hopefully the questions I have aren't too obvious. 1. I have 2 sensors that I need to hook up to the PLC and I'm having trouble figuring out exactly what I need to do for it, I've looked up some posts on here about it but none of them seem to apply. It's a 4-20mA analog input that reads pH levels, but I'm not exactly sure what the linearization inputs (X1, Y1, X2, Y2, Y) should be. If there's a guide or example program about that all I need is a point in the right direction. This is the sensor we have - https://www.sensorex.com/docs/specs/SpecsS600Inline.pdf 2. Is there any way to make a timer that counts up? I came up with a convoluted way of doing that using a timer set at max time and subtracting it from that number, but I feel like there's a simpler way to do that I'm missing. 3. For sending an email through a PLC is an SD card required? The example program (Joe Tauser's) that I got from here has inputs for the email text and all of that and it seems to hold all the information I need to put on it so can I not use the SD card in that case? Thanks for the assistance, if there's any other information I can send that would be helpful just let me know.
  17. Of all the stupid issues, yup that was it. Everything is working now! Thank you guys so much for the assistance.
  18. Okay so as an update, the inputs now seem to be correct (I just took all the jumpers out and redid them, I think J3 was actually the issue cause it wasn't in its default state) but now the linearization is not giving me the numbers that I want it to. The input numbers are within the range and aren't wavering at all, but the output is not what I would expect it to be. Also after the reset the big negative numbers did not go away. Edit - Wait I lied ignore the negative number comment, I realize I didn't actually reset it. Those are now gone but everything else is the same.
  19. This is it when it is online. The 3 on there is bouncing between 0-4 every cycle, but that isn't a value it should be getting. And the 2 large negative numbers in the unused MI's make no sense to me. I have the Inputs set up as such...
  20. Okay, so in my haste to get it set up I seem to have forgotten the 250ohm resistor. If that doesn't cause it to be correct then I will try these suggestions and get back to you guys. We ran them over the weekend as per the instructions on the sensors, so hopefully they should be stable when I test them again. Thanks for all the help though, definitely a little out of my element with these so it's a learning experience.
  21. So I'm probably not going to actually help but I know for accounts and passwords I've dealt with in the past it's always a space at the end, you could try that.
  22. So I have the inputs and outputs all sorted, but the input coming from the sensor is reading as 1024 for sensor A and 0 for sensor B which doesn't seem to make any sense. The sensor is in a pH buffer of 4, but it also stays at exactly 1024/0, which seems off because it should fluctuate at least slightly. Edit - Added pictures to see if it's something obvious that I'm just missing. I have it set to the 10bit numbers because I'm just using the onboard analog inputs of the V350-35-r34. The wiring is: Sensor ---> Pathfinder Transmitter ---> + (Power Supply) - (PLC Analog Input) GND (GND) http://pathfinderinstruments.com/ph/orp-transmitters/pathfinder-emit-ph/ http://pathfinderinstruments.com/ph/orp-transmitters/pathfinder-emit-orp/ Transmitters in question.
  23. You were correct in that it has a transmitter between it and the PLC. https://sensorex.com/docs/instructions/InstrTX100.pdf
  24. Okay so I do have a follow-up question. The sensor that I'm using measures ORP and pH, how do I differentiate the two when it's only 1 input?
×