Michael Lloyd

MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

51 Excellent


About Michael Lloyd

  • Rank
  • Birthday 06/01/58

Profile Information

  • Gender Male
  • Location Texas
  • Country United States
  • Interests Photography, Long Range Shooting, Reloading, Fishing, Hunting

Recent Profile Visitors

4174 profile views
  1. Robotic Pick and Place addressing method

    I'm assuming that you know how to create a timer tag, have used the TON instruction, and all that. If the tagname is T1 then T1.DN will tell you when it's "Done" counting so use that, a one shot, and a MOV to put a value  into an INT (or DINT if there are a lot addresses to save) that correlates to the part. Or if you want to trigger the save at the start of the operation use T1.TT in place of the Done bit.    Page 130:  https://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1756-rm003_-en-p.pdf
  2. Can't browse beyond 1756-ENBT in rslinx classic gateway

    This is one to print and put away for future reference. 
  3. Unclear on OTE OTU instructions used together

    Ditto but I don't think it is polled every scan. I think there is a scan rate. so the E-stop status could turn it on as long as the first rung doesn't unlatch it. I am looking at it as if I was monitoring a button with ProSoft serial (modbus) card and the scan rate is every 5s.  There's is a high probability that I'm wrong but that's how I'm looking at it. PS - I think it's fairly sloppy programming but am hesitant to be too critical of it
  4. Unclear on OTE OTU instructions used together

    Except O:1/28 is in a DeviceNet card not an output card
  5. Unclear on OTE OTU instructions used together

    But there's always the rest of the story. I'm not familiar with (or a fan of) DeviceNet but doesn't the DN card read the IO point? It looks to me like the output in the first rung is indicating the state of the E-Stop on the drive. If I had a dollar for every time I looked at someone else's program wondered "wtf was that guy was thinking" I'd have a lot of dollars. Not enough dollars, but a lot. I've currently got an abomination of a CLX program on my right screen and the new program to replace it on the left screen. It's an abomination in CLX... and in the SLC or PLC5 it was written for it's probably sheer genius
  6. Unclear on OTE OTU instructions used together

    N just means integer. Think of an N as being a group of integers and also be aware that you can bit pick the integer (ie use the individual bits if the integer) If N15:101 = 2 it unlatches an output that is in a VFD that lives on devicenet If N15:101 = 3 or 4 then it latches the output
  7. Unclear on OTE OTU instructions used together

    I like the Delta V. It's one of the few DCS platforms that I would say that about It sounds like the OTU is driven by a soft input (like a button from an HMI only this is a signal from DeviceNet). Maybe this is someone's idea of a latch / unlatch? Imagine that you have a button addressed in an HMI such that "On Button Down" turns the output in the PLC on (this is reverse from what you seem to have). If there's nothing in the PLC to turn the output off, it stays on. In this case you would add an OTU to unlatch the output.
  8. Can't browse beyond 1756-ENBT in rslinx classic gateway

    Well... you mentioned the EDS file but did you install it? I haven't used an ENBT in about 5 years. The EN2T is a much better card imho. But I remember this happening in reverse when we first used the EN2T.  You're in the right place. There are a lot of very sharp and helpful people here
  9. RSLINX in excel

      I don't :o) I copy and paste the result of the formula into a structured text file (called IOM for IO mapping) and it shows up as structured text. It's about as easy as it gets. I've attached my "base program". Everything for me starts with that (lots of UDT's and some AOI's in the base program. You'll see  that everything has documentation that looks somewhat useless but it has a purpose. If you export a CLX tag database the doc's section is empty AND the tag doesn't show up in the export. So I documented it (Spare Shutdown, Spare Alarm, etc). It took a looooong time but I only had to do it once. I also included the IO sheet. Once it's filled out, almost all of the PLC documentation is done with Export / Copy Paste / Import.  Time is money... so time saved building a project is valuable. I always charged by IO count and never did change orders UNLESS they increased the IO count. So when they swapped IO around or added something to a card, I didn't care since (in the business I work in, oil and gas) any change or add was simple. Even adding a pump and all of it's logic was a simple matter of cut / paste / find and replace (the tagname to the left of the dot field. Like copy P6000 logic to P7000, then search P6000 in the logic and replace with P7000 after your create the P7000 tag)). It's hard to explain this way but it's very simple. I made the same thing for a Compact Logix and SLC (SLC is not as useful)   Blank CLX IO Sheet Rev 0.xls LogixInitial.ACD
  10. RSLINX in excel

    See the attached file that is more specific to your question. I built what I outlined above. Part of the tag in cell A, number in cell B, rest of the tag in cell C. Formula (A1&B1&C1) in cell E Copy and paste the contents of cells A, C, and E down as far as you need it, put a 1 in B2, then select B1 and B2, now drag that down and it'll increment the numbers in the column (0, 1, 2, etc). Cell E will have your tag but it's a formula. Copy / paste that but do right click, paste special, as value in cell G, there's your tag... Tag Builder Test.xlsx
  11. RSLINX in excel

    BTW- the IOM Builder spreadsheet came about because I needed a way to map IO to tags that was quicker than typing 400-500 or more text strings. Mapping tags lets me build a program before I even know where the wiring lands in the PLC. Everything is addressed to a tag and the IO is mapped to it. The spreadsheet turned a day or more of work, that had errors, into a few minutes. I have another one for mapping analog data. And another one for documenting analog data. Also, if you map the IO they (the customer) can change their mind all they want. If they move wiring around, I just change a value in the map tag. 
  12. RSLINX in excel

    Turn this - =RSLINX|MC!'Database_fifo[0].Motor_rpm, L1,C1' into a formula Deleted the formula because it was a crappy example You know... I think this will work better if I give you a working example See the attached spreadsheet Click on the Motor Definition Tab, then go look at the way that I assembled that data into a string of data in the Motors with Start Stop IO tab. You copy the results of the formula using paste as value. IOM Builder Rev 2.xls
  13. Creating an Array in Compactlogix_17JUN19

    This got way longer than what your question warranted... It's already been covered but you can even make a String Array (put the text for an HMI in the string and you only have to reference the string tag in the HMI rather than type it. That gives you dynamic tagname and descriptions. If you know what the N's are (aside from being godawful SLC 500 imports vs writing the program properly for CLX) make a UDT so the tags and description makes sense to the next victim then map the N's over to the tags A UDT only allows single dimension arrays (but there is a workaround by using a UDT inside the UDT. It's a bit of a kludge in my world but might be useful in some industries) You can play with all of this in an offline blank program Single Dimension Array: TestTag DINT[10] will give you  10 DINT's starting With TestTag[0] to TestTag[3] Try TestTag DINT[10,10] for some real fun. You get TestTagp[0,0 to TestTag[0,9] up to Test[9,0] to Test[9,9], ie 100 DINT's But... depending on what the data is the tag doesn't really make sense. The power of CLX is that you can make the program more clear by using tags that make sense. Lets say N1 = Speed Min, N2 = Speed Max, N3 = Step Number, N4 = Status Make a UDT, call it... I can't think of anything nice to call N's imported from a SLC so you make the name up... The UDT (Look under Data Types for User Defined Data Type) might look like this  Name  Data  Type  Style  Description  External Access SMin    DINT    Decimal    Speed Minimum    Read/Write SMax    DINT    Decimal    Speed Maximum    Read/Write Step     DINT    Decimal    Step Number    Read/Write Status  DINT    Decimal    Status of Operation    Read/Write                  Now make a tag UDTest [put UDT name here]. I called my testing UDT Alf so UDTest[Alf] UDTest    <normal>            Alf    Standard    Test    Read/Write    0         UDTest.Smin                DINT    Standard    Test Speed Minimum    Read/Write        Decimal     UDTest.Smax                DINT    Standard    Test Speed Maximum    Read/Write        Decimal     UDTest.Step                DINT    Standard    Test Step Number    Read/Write        Decimal     UDTest.Status                DINT    Standard    Test Status of Operation    Read/Write        Decimal       If you make the tagname make sense, without getting too wordy (UDTest is too wordy) then the tagname is useful ***************** Real world (my world, not useful for other industries) UDT The UDT is called Motor. It's literally made for anything that we have that is driven by an electric motor. It looks like this: String1    STRING            Read/Write    1    0 String2    STRING            Read/Write    2    0 SW    INT    Decimal        Read/Write    3    0 A    BOOL    Decimal        Read/Write    5    0 A_Stop    BOOL    Decimal    Auto Stop     Read/Write    6    0 A_Start    BOOL    Decimal    Auto Start    Read/Write    7    0 Stop_I    BOOL    Decimal    Stop Input    Read/Write    8    0 Start_I    BOOL    Decimal    Start Input    Read/Write    9    0 HMIStop    BOOL    Decimal    HMI Stop Button    Read/Write    10    0 HMIStart    BOOL    Decimal    HMI Start Button    Read/Write    11    0 RunStat    BOOL    Decimal    Run Status    Read/Write    12    0 Stop    BOOL    Decimal    Motor Stop    Read/Write    14    0 Run    BOOL    Decimal    Motor Run    Read/Write    15    0 AStop_OS    BOOL    Decimal    Auto Stop One Shot    Read/Write    16    0 AStart_OS    BOOL    Decimal    Auto Start One Shot    Read/Write    17    0 FStart_OS    BOOL    Decimal    Field Start One Shot    Read/Write    18    0 HStart_OS    BOOL    Decimal    HMI Start One Shot    Read/Write    19    0 SOS    BOOL    Decimal    Start Counter One Shot    Read/Write    20    0 RH    DINT    Decimal    Run Hours    Read/Write    21    0 S    DINT    Decimal    Number of Starts    Read/Write    22    0 FailTMR    TIMER        Fail to Start Timer    Read/Write    23    0 T1    TIMER            Read/Write    24    0 T2    TIMER            Read/Write    25    0 T3    TIMER            Read/Write    26    0 T4    TIMER            Read/Write    27    0 T5    TIMER            Read/Write    28    0 T6    TIMER            Read/Write    29    0 T7    TIMER            Read/Write    30    0 T8    TIMER            Read/Write    31    0 T9    TIMER            Read/Write    32    0 T10    TIMER            Read/Write    33    0 RMT    TIMER        Run Minute Timer    Read/Write    34    0 RMC    COUNTER        Run Minute Counter    Read/Write    35    0   Note the mix of data types and the descriptions. Also note that T1 thru T10 do not have a description. These are timers that are available for anything related to Pump Start/Stop logic and the description can be anything. 10 Timers is as many as we need so far. I can edit the UDT if we need more. An example tag looks like this  P5200    <normal>            Motor    Standard    P-5200    Read/Write    0         P5200.String1                STRING    Standard    P-5200    Read/Write             P5200.String2                STRING    Standard    South Mainline Pump    Read/Write             P5200.SW                INT    Standard    P-5200 Status Word    Read/Write        Decimal     P5200.A                BOOL    Standard    P-5200 Auto Mode    Read/Write        Decimal     P5200.A_Stop                BOOL    Standard    P-5200 Auto Stop    Read/Write        Decimal     P5200.A_Start                BOOL    Standard    P-5200 Auto Start    Read/Write        Decimal     P5200.Stop_I                BOOL    Standard    P-5200 Stop Input    Read/Write        Decimal     P5200.Start_I                BOOL    Standard    P-5200 Start Input    Read/Write        Decimal     P5200.HMIStop                BOOL    Standard    P-5200 Stop Control from HMI    Read/Write        Decimal     P5200.HMIStart                BOOL    Standard    P-5200 Start Control from HMI    Read/Write        Decimal     P5200.RunStat                BOOL    Standard    P-5200 Run Status    Read/Write        Decimal     P5200.Stop                BOOL    Standard    P-5200 Motor Stop    Read/Write        Decimal     P5200.Run                BOOL    Standard    P-5200 Run Motor    Read/Write        Decimal     P5200.AStop_OS                BOOL    Standard    P-5200 Auto Stop One Shot    Read/Write        Decimal     P5200.AStart_OS                BOOL    Standard    P-5200 Auto Start One Shot    Read/Write        Decimal     P5200.FStart_OS                BOOL    Standard    P-5200 Field Start One Shot    Read/Write        Decimal     P5200.HStart_OS                BOOL    Standard    P-5200 HMI Start One Shot    Read/Write        Decimal     P5200.SOS                BOOL    Standard    P-5200 Start Counter One Shot    Read/Write        Decimal     P5200.RH                DINT    Standard    P-5200 Run Hours    Read/Write        Decimal     P5200.S                DINT    Standard    P-5200 Number of Starts    Read/Write        Decimal     P5200.FailTMR                TIMER    Standard    P-5200 Fail to Start Timer    Read/Write             P5200.SDTimer                TIMER    Standard    P-5200 Low Suction Pressure Shutdown Delay Timer    Read/Write             P5200.SD1Timer                TIMER    Standard    P-5200 Low Differential Pressure Shutdown Delay Timer    Read/Write             P5200.SD2Timer                TIMER    Standard    P-5200 Low Flow Shutdown Delay Timer    Read/Write             P5200.VSD1Timer                TIMER    Standard    P-5200 Motor Outboard Bearing Vibration Shutdown Delay Timer    Read/Write             P5200.VSD2Timer                TIMER    Standard    P-5200 Motor Inboard Bearing Vibration Shutdown Delay Timer    Read/Write             P5200.VSD3Timer                TIMER    Standard    P-5200 Pump Inboard Bearing Vibration Shutdown Delay Timer    Read/Write             P5200.VSD4Timer                TIMER    Standard    P-5200 Pump Middle Bearing Vibration Shutdown Delay Timer    Read/Write             P5200.VSD5Timer                TIMER    Standard    P-5200 Pump Outboard Bearing Vibration Shutdown Delay Timer    Read/Write             P5200.RMT                TIMER    Standard    P-5200 Run Minute Timer    Read/Write             P5200.RMC                COUNTER    Standard    P-5200 Run Minute Counter    Read/Write             Note how P-5200 in the first description ends up in every tag description If there are 9 pumps and the logic is essentially the same (other than what shuts it down) then you make 10 tags with the correct tagname (P5100 thru P5900, data type Motor), then write the logic for one pump (tag is P5100), then copy and the past original routine to 8 more routines, rename them, then edit each routine by doing a search and replace for P5100 and replacing it with the correct tag for the routine... 95% of the programming work for the pumps is done at this point. All you have to do is true up the shutdown logic and maybe the start and stop logic. UDT's are very handy...  
  14. My Model Train Project

    I was wondering how the full scale controllers work and I came across these when I googled "supervised railroad interconnect circuit":  http://www.dot.state.mn.us/trafficeng/signals/worksheets/preemtionmanual2004.pdf https://static.tti.tamu.edu/tti.tamu.edu/documents/1439-9.pdf It might not be helpful or scale-able but I thought it was interesting, Starting around page 127 (first link) they get into calculating the amount of time it takes a vehicle to accelerate through an intersection after the signal starts to flash. I only skimmed it so there's probably more info (useful? Maybe. Maybe Not). The photo on page 50 of the first link is worth a look :) The old school switchers are made up of simple relays and switches (very robustly constructed though) so definitely something a PLC could do. Power supplies- If for some reason you find yourself needing a lot of DC power you can find used Astron power supplies online fairly cheap. Ham operators (NE5U) need a lot of 12VDC power , at least we think we do. I just picked up an Astron RS20A in what seems to be like new condition (I load tested it and it'll do the full 20A with no issues) for $50 including shipping. 12VDC / 20A . Powerwerx also sells power supplies but they'll set you back a bit:  https://powerwerx.com/power-supplies  I've been running their 30A supply for a few years.
  15. logix 5000 array

    There are a lot of ways to skin this cat (no offense to cats) but I'll offer mine, create a UDT (User Defined DataType), I called mine DateTime and it looks like this: Year    DINT    Decimal    Year    Read/Write Month    DINT    Decimal    Month (1-12)    Read/Write Day    DINT    Decimal    Day (1-31)    Read/Write Hour    DINT    Decimal    Hour (0-23)    Read/Write Minute    DINT    Decimal    Minute (0-59)    Read/Write Second    DINT    Decimal    Second (0-59)    Read/Write Microsecond    DINT    Decimal    Microsecond (0-999,999)    Read/Write GSV is running in a structured text program that does a few other things. The top line is relevant to this post and it's all you would need. *** GSV(WALLCLOCKTIME,,DateTime,CLOCK.Year ); GSV(FAULTLOG,,MinorFaultBits,Minor_Faults ); GSV(FAULTLOG,,MajorFaultBits,Major_Faults ); GSV(TASK,MainTask,LastScanTime,IO_Test_Info.Last_Scan ); GSV(TASK,MainTask,MaxScanTime,IO_Test_Info.Max_Scan ); GSV(TASK,MainTask,Watchdog,IO_Test_Info.Watchdog ); ITI.Last_Scan := IO_Test_Info.Last_Scan / 1000.0; ITI.Max_Scan := IO_Test_Info.Max_Scan / 1000.0; ITI.Watchdog := IO_Test_Info.Watchdog / 1000.0; Flash.S := CLOCK.Second.0; Flash.F := CLOCK.Microsecond.19; OFF := 0; ON := 1; ID := 0; (* PID Increase / Decrease Control Action *) II := 1; (* PID Increase / Increase Control Action *) *** If you don't have structured text available you can call GSV in ladder.  Then I create a tag called Clock and make it of the DataType DateTime In your case the data type would be DateTime[xx] where the xx is the number of times you need to log the parameters in the Clock tag I attached a screenshot of an example of what the tag would look like if it had an array size of 10  Now you just increment a pointer and move the  Clock tag to the Test(x) tag, where x is 0, 1, 2, etc ie the incremented pointer Tip: Don't get wordy with the Tagname. Ie don't make it TimestampCaptureArray or something like that. Use TSCA or something short and document it in the Description. Too many people try to describe the whole routine with the tagname :-/ That's what the description is. Long tagnames clutter up the program, make it a pita to troubleshoot, and make it look like you imported your program from a SLC or PLC5. I used to write novels with my tags. Then I started doing contract programming and it became clear that something had to change. Time is money, typing takes time.