Michael Lloyd

MrPLC Member
  • Content count

    963
  • Joined

  • Last visited

Posts posted by Michael Lloyd


  1. 6 hours ago, alan_505 said:

    Also unlatches can be used to turn off bits turned on by a HMI.

     

     

    Quote

    The bit could feasibly be turned on by the HMI and an instant later you could lose comm with the panel and the bit will stay on. I'm sure there are other scenarios. That's just one example that I've had happen. When I use an HMI button in a routine I'll use an XIO to an Unlatch coil (both tags are the same) on the last rung.

    I mentioned that. 


  2. Ok, fair enough. Like I said, we all start sometime.

    The scan is linear, ie Rung 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, etc

    As the ladder looks right now

    Rung 0 turns SEED_HOME_0 OFF

    Rung 1 turns SEED_DISPENSE_0 OFF

    Rung 2 turns SEED_CLOSE_0 OFF

    Rung 3 turns SEED_STOP_0 OFF.

    Rung 4 turns SEED_STOP_0 OFF

    Rung 5 turns SEED_ALARM_CLEAR_0

    Rung 6 turns SEED_MOVE_DISPENSE OFF THEN SEED_MOVE_CLOSED OFF THEN SEED_STOP_0 OFF.

    Repeat.  <--- As in all of the above evaluates at the scan rate. Sub-10 milliseconds is likely

    You don't need unlatches because your rungs evaluate every scan and there is no latch. Unlatches are for latches. One exception to that is if you use an Input that is turned off and an by an HMI. The bit could feasibly be turned on by the HMI and an instant later you could lose comm with the panel and the bit will stay on. I'm sure there are other scenarios. That's just one example that I've had happen. When I use an HMI button in a routine I'll use an XIO to an Unlatch coil (both tags are the same) on the last rung.

    Scan rate is likely to be in under 10ms You might be able to get a little flicker out of the logic as its written but I doubt it. 

    B) I see, I can make my outputs not series. It's more common to have parallel outputs. 

    C) So am I not able to use SEED_STOP_O multiple times? I am trying to tell my servo controller to stop. And I want to stop it when it hits my limit sensors. How should I approach this?

    You build parallel rungs that all tell SEED_STOP_0 to turn on. X OR Y OR Z turn the output on

    --] [--] [  <--- this evaluates as X AND Y

    --] [--

    |     |  ------------------ This ugly mess is supposed to be X with a Y branch that evaluates as X OR Y

    --] [ --

     

    You can get as complicated as you want to with AND and OR logic in one rung. 


  3. On 2/21/2021 at 0:11 PM, chelton said:

    Using your example JSR(_Fx,2,21,MstrDmd,lbdPosGas)

    Subrutine _Fx is called with input parameter 21 and MstDmd and returns lbdPosGas.

    In the Subroutine,

    Rung 1 will evaluate to 21-1 AND 7 = 4

    Rung 4 will then be evaluated because FxNo is between 17-24 so the COP will copy 32 elements from  FX17_24[4,0,0] to FxX0 

    ......

    That's as much as I can explain without knowing the value of MstDmd.

     

     

    Apologies for dropping off. This helped turn the light on. The part that was missing for me, even though I pasted screenshots from the HMI, was that the HMI was the source for FXNo. This program is nearly impossible for a new tech to decypher. I've been working with the tech to learn how to get around this program. To his credit, even though he hasn't got much PLC experience he's picking up on it pretty well. Thanks for your help on this. 

    ************** 

    “The nice thing about standards is that you have so many to choose from.” –Andrew Tanenbaum, Computer Networks, 2nd ed, p254.


  4. It's been about 12 years but I connected 5 small point IO racks to a Controllogix box that had two remote racks on it. All of the remote racks were on EN2T's (maybe ENBT's, I wouldn't use an ENBT). 

    The link to the point IO racks was made with an MDS i-Net 900 MHz radios (one master and 5 slaves). Distance was a couple of miles. It worked great until the trees leafed out and the signal dropped out. I had to go back and raise the antennas

     


  5. One other possibility is that a lot of us like what we've come up with. We don't use AB HMI software. We use Cygnet or ClearSCADA (although Schneider has done what they always do when they buy something and let ClearSCADA founder). I took a look at Plant Pax recently... that thing is a pig... 


  6. If that's the case, and I'm not misunderstanding, the FXNo would never go above 7 and that's not happening in real life and can't happen or 3/4 of the control system wouldn't work.

    _Fx is called from 14 different routines (some not used). The following is one of the calls that places 21 into the Input Parameter of the subroutine called _Fx. the input parameter is the tag FxNo

    JSR(_Fx,2,21,MstrDmd,IbdPosGas)

     


  7. 20 minutes ago, chelton said:

    what else is writing to FxTblStart?   How can FxNo-1 AND 7 = 1?    

    FxNo-1 AND 7 is the equation. FxNo MINUS 1 AND 7

    Every time the pointer indexes something else is computed and read into and out of tables pointed to by FxNo (Function Number), I think....

    FxTblStart is the pointer for the table.

    FxNo is the index for the desired calculation.

    I think... 


  8. Destination: FxTblStart ; this is an integer that is used as a pointer for some interesting array "stuff" (see PDF link below)

    Source: FxNo-1 AND 7

    In this case FxNo = 20

    20-1 = 19 AND 7? AND is a boolean statement. The CPT instructions say AND is a bitwise operator (because it is) so the intent is not to add 19 and 7 together.

    Fx17-24 (see the PDF), among other tags, is DataType REAL[8,2,16]. The arrays that I've used are x,y.

    BTW, This is from the boiler control program that I've bi... complained about for a few years. It came without documentation. In my spare time I've manage to document a large part of it. The routine is, I think, my final WTH thing to figure out. As much as I want to hate it there's a level of old school programming skill that's enviable (and irritating) in this thing.

    Before anyone jumps on the pulpit, yes, I'm very well versed in fired heater and boiler control as well as combustion. I've done it for 1/2 of my life. There is a simpler way to do what they did BUT I'm not going to rewrite the PLC program and HMI just because I don't understand what they did. I'd rather understand it than delete it.

    Here's a PDF of the routine: https://www.dropbox.com/s/nmt5pepvn8qr6l3/Fx.pdf?dl=0

    The tags aren't documented. That's what I'm working on now. The HMI has two screens that references most of the tags. The first screen (below) shows 20: as selected. I'm trying to troubleshoot why the feedback for the FGR Damper position doesn't match the setpoint. Visibly it's in the correct position. It looks like there's characterization for the output and the feedback but until I understand what Fx is doing I'm not going to let the tech touch anything. 

    p4133212817-4.jpg

    p4133212816-4.jpg

     


  9. Curious minds want to know what the problem was.

    I made the attached PDF to let my SCADA group know what the problem ended up being with a MODBUS ASCII problem (why... why is MODBUS ASCII even necessary in 2021?). 

    SLC PLC talking to a Fisher ROC. "Nothing had changed in either program", "I only looked at it, I didn't change anything". The clue came from decoding the Function Code returned. 131. It's not easy to see 131h in the attached PDF because of the ASCII protocol.  Page 2,3, and 4 are the useful bits in the attachment. The rest of it was from my spreadsheet. I guess attachments aren't allowed anymore so I'll go with a dropbox link instead

    https://www.dropbox.com/s/e9usj5u7qmq5m0m/MODBUS%20ASCII%20and%20RTU%20Decode.pdf?dl=0


  10. V17 is "vintage" :) 

    We started with ENBT/A's about 10 years ago and about a year into a 3 year long project with 53 PLC's, etc, blah blah the rep strongly suggested moving to EN2T's, which we did. It was a good move. The odd comm issues that were "fixed" by sending a tech out at 2am to unplug the ENBT and plug it back in vanished. Your CIP timeouts error growing situation tweaked a memory of diagnostic checks that I did trying to find the issue and I believe that was the same issue we could see but didn't know what to do to fix it other than pulling the card, wait x seconds, and plug it back in. Not a great plan...


  11. You can manage the lines by not having any. For instance, using a very simple example of a multiply block\

    I created a Multiply block and called it X1. X1 tags are:

    X1.SourceA, X1SourceB, and X1.Dest

    In structured text I could do

    X1.SourceA := tag or value

    X1.SourceB := tag or value

    X1.Dest could be mapped to another tag or just use X1.Dest

    If you don't have Structured text use a MOV move a value to X1.SourceA and X1.SourceB

    Very crude example.

     

    Here's a real life example of how I map tags to/from a liquid orifice plate calculation:

    // Liquid Orifice Flow Calculation

    FI2101.HW := Analog[30].PV;
    FI2101.Tf := 98.0;
    FI2101.D := 6.065;
    FI2101.Bore := 3.625;
    FI2101.Sg60 := .7813;
    FI2101.SgF := 0.7726;
    FI2101.ngpm := 5.667;
    FI2101.nbph := 8.096;

    FI2201.HW := Analog[37].PV;
    FI2201.Tf := 98.0;
    FI2201.D := 6.065;
    FI2201.Bore := 3.625;
    FI2201.Sg60 := .7813;
    FI2201.SgF := 0.7726;
    FI2201.ngpm := 5.667;
    FI2201.nbph := 8.096;

    The left side is the input to a function block.


  12. Final resolution was to take my laptop off of the network. The FlexNet "issue" is only an issue when the laptop is in the WAN but I can't find any software or driver that's causing it. I also loaded version 31, some patches, and AOP's. Both computers work now. The desktop is on the network and the laptop isn't. I suppose I should try it on the network since I made the same changes to it. Maybe later :) 


  13. You were very helpful Bob. You pointed me to the FlexNet problem. I didn't realize that it wasn't AB software. It looked odd to me. I didn't remember the server being called FlexNet, because it isn't, but for all I knew AB had changed it. I've attached what I think is the last piece of the puzzle. I don't know why "it worked and then it didn't" yesterday. 

    Note: I think I uploaded it. I can see the file but it popped an upload failed screen when I tried to upload (edit - Nope... no file uploaded. Standby. I'll put it in Dropbox and link it.


  14. Once again it appears that posting on a forum will resolve problems

    For instance - the security key issue "fixed itself". Yesterday, post IT update, there were no Factory Talk service running. They were all gone. I left the laptop on and logged in over lunch. It logged out but things happen in the background. The laptop now has all of the services back and it recognizes my license dongle. No software installs were performed. I think the IT help desk was working behind the scenes. They knew there was a problem as of yesterday. It's not unusual for that to happen. (no longer working, read on)

    I think the AOP issue is simpler. I tried another group of AOP's. Bear in mind that I downloaded Gigabytes of AOP updates. This one is the most recent: RA1756ApexAnalog_Rel_4.02.26_Signed and I can now edit the RTD cards without crashing the software on the desktop

    And in the time it took to type this, the laptop "FlexNet" problem is back. When I could see my license files and I checked the server all it said was server. Now it says FlexNet and none of the software is authorized. I turned off the WiFi and shut the computer down. I'll get back on it tomorrow. 1/2 way there...


  15. Problem 1: Laptop doesn't recognize the license dongle. FlexNet server stopped and won't start (Flexnet doesn't ring any bells, is that the right server for license files?). No license available My laptop was working fine. It hasn't been on the company network for about 3 months, which is probably why it was working fine. When I plugged it into the network I got the "you aren't authorized for this network, begone you evil Russian hacker"... ok, I made the last part up. Our wonderful IT lady (seriously) came by, clickety clackety click, and now the laptop works on the network but the license server stopped working. It gets better. The desktop, 2' away, that has been on the network for the whole time, works fine. The server is running, licenses are recognized. Life is good.

     

    Problem 2: Neither the laptop or the desktop will let me add a 1756 IRT8I 8 channel RTD / Thermocouple AI card (Rev 11). I sent the program to a friend and he was able to add 2 with no issues. He sent the program back to me but when I opened the program, then opened the module, and then made a simple edit (renamed the card to RTD1) it pops the same error as always  

    PS1756ApexAnalogTagExt  a big red X and OUT OF MEMORY. Click ok and the program faults and shuts down, eventually popping a fatal error message that basically says there's no message.

    It's a do nothing program that is literally just IO cards. I've got to FAT a panel in a few weeks and I need a way to force IO. I can attach it but since one person can edit it and I can't on either machine that seems pointless. I tried it on the laptop before I screwed up and put it on the network and got the same error. Only if I try to add the RTD card though. All other cards are fine.

    I've updated AOP's, make that- I've updated gobs of AOP's, giga gobs even. I've done the same with EDS files. I've rebooted numerous times. I made sure my computer was plugged in and the monitor was turned on :/ (shout out to IT helpdesk people everywhere). I've tried colorful language, hateful stares... nothing works so I'm going to the one place that usually has a solution... 

    Studio 5000 version 28 btw.  

    Plan z is to try loading the software on my personal laptop and seeing if IT proofed computers work any better. I was pretty sure the AOP was going to fix it. Nyet...