Zener

MrPLC Member
  • Content count

    5
  • Joined

  • Last visited

Everything posted by Zener

  1. Agreed Filthy, you won't see the change in the property box, I used a GSV to record the priority to 2 separate tags, there was no difference between them.  I am guessing that the priority boost may not be reflected in the GSV, (and the GSV simply returns what is in the property box). Also, I did find reference before my original post that the UID accomplished this blocking of being interrupted by raising the priority.  I am confident I found this in one of the AB manuals, but cannot remember where I saw that, nor can I re-find it (of course ) Either way, Logix allows conditions ahead of the UID/UIE instructions and I am changing my code back to having logic ahead of them (yes I had it that way to begin with) and I will see if the problem that caused me to use the instruction pair comes back.  
  2. All of the documentation for the UID/UIE set of instructions seem to indicate that they need to exist on a rung alone, is this the case?  I would like to conditionally execute the UID and UIE instructions based on logic conditions.  RSLogix 5000 allows me to add the instructions in this manner, but I am unsure if it works properly, or how to exactly test if they do work when this is done. One help manual states that the UID boosts the priority of the current task and the UIE restores the priority, but using a GSV shows no difference between the priority values for the task when logged inside or outside the pair whether the pair is inside conditional statements or on separate rungs. Does anyone know if they can be conditionally executed, or at least have an idea of how to test this?  
  3. Only use the controlling AOI in one place and centralize your controlling logic from all external sources.  Treat the AOI the same way you would a standard coil and do not try to control it from multiple places by using the same instance in multiple places.  The advantage of AOIs is not so much to be able to use the same instance multiple places but instead centralize the controlling code and make it modular for re-use (say for instance your clamp has auto/manual control, or needs to trigger an unlock output before releasing the clamp).  If you have multiple clamps that need to operate in the same manner, make that control the AOI and create Clamp1, Clamp2, Clamp3...instances of that AOI but include each INSTANCE only once in your code.  Then the outputs of that AOI will be fed to the correct physical outputs and the inputs will be fed from your controlling logic. Hopefully that makes sense and I didn't over-generalize.  
  4. STRING TO HEX STRING

    Are you trying to send a 3 character string?  Where Str[0]=char(16#02), Str[1] = char(16#21), and Str[2] = char(16#AD), and Str[3] = char(D) ? If this is the case trying to build a string with a '$' is different than the characters represented by the hex values.  This is shown below.  I have an EQU instruction to display the current string value that was built using individual ASCII Char values. Can you post a description of the mass flow meter's communication protocol to assist with what it might be expecting?  
  5. I am not sure where to start with an answer.  I would first create a UDDT with string and dint members (like UDDT_MyDatatype). Define a tag array of that type (MyData[10]) Then you use the .dn bit of the FIFO to determine if there are 10 elements in the array or not.  use the .em bit to determine if it is empty (to FFU it). I use the logic in the attached image to "log" recent data placed into a different queue.  This queue will fill up and store the last 20 values placed into a different queue which is the one being "processed" by the system. In this logic, I check if the FIFO is full (.dn bit set), if it is I unload the head element making room for the newest member which is done in the second rung branch.  I have come accustomed to OTU the .en bit because the FFL instruction only allows one addition per scan and I sometimes need to add multiple values in a single scan.  The same with a FFU (except there I OTU THE .eu bit).