MrPLC Member
  • Content count

  • Joined

  • Last visited

Everything posted by Groo

  1. Newbie Help, Migrating from Allen Bradley

    The help file appendices show the detailed break down of all data types, its in the PDF Programming with Step 7. Especially helpful for the format of Pointers and the ANY data format.
  2. Newbie Help, Migrating from Allen Bradley

    What you have to get to understand is the difference between FB's and FC's.    Also find the libraries (SFB's and SFC's), I've seen people struggle to develop code for functions that were in the libraries simply because they didn't realise they were there.   For instance the Siemens Timers are archaic and the format is based on the old S5 timers, most people commonly use SFB4 which a TON timer.
  3. Newbie Help, Migrating from Allen Bradley

    But it is far more flexible, in Logix you can only indirectly address into arrays, Step 7 is much more flexible and can indirectly address virtually anywhere.
  4. tracking down bit locations in step 7

    I've worked a lot with Siemens, my favourite PLC, but haven't touched one for 4 years now so a bit rusty.   You can cross reference or look at the program structure, which is like a block tree showing the block calls starting from OB1.   This manual section 14 can help   If I had the program I'd give you the buttons to press but unfortunately I don't have it, sorry.
  5. tracking down bit locations in step 7

    How many times is FB35 called? You can cross ref FB35 or even DB77 to find it. An Instance DB is the instantaneous memory for a single FB call, unless they are doing something odd, there should only be one FB35 call with DB77 as its instance DB. This DB stores the I/O to the FB and all the internal memory STAT flags for that one call.  Every call to FB35 should declare a unique DB and that DB cannot then be attached to any other FB (although it could be attached to second FB35 but that would overwrite any status from the previous call).   An instance DB also cannot have its format modified, its automatically set up to the I/O and STAT's of the FB its assigned to.        
  6. tracking down bit locations in step 7

    If the Data Bit used in the program is in an Instance DB, which is linked to an Input point of the FB call, the way to find where its set is to search for the Input tag. i.e if the tag connected to the input of FB35, where DB77 is the instance, is M100.6 then search for M100.6. Is it good practice, without seeing the program I don't know why they did this. Its fairly common to use Instance DB bits in the program elsewhere, but unsure why they would use a bit/byte/word attached to an actual I/O point to the FB, it seems to me to be easier to use the actual I/O point. It could be its a common program where they change the actual I/O points but the main program is standard and the same, this way using the I/O Instance DB point sort of makes sense. Why do you need to find every instance of call to FB35??, DB77 is only the instance DB for one single call, any other call would use a different DB.    
  7. "newbie" to Siemens, ID of PLC and uses please

    For Siemens you'd be looking at S7-1200 as a starter and I believe if your restricting yourself to this smaller PLC there is a cheaper software option.      
  8. "newbie" to Siemens, ID of PLC and uses please

    The S7-200 PLC is obsolete now. I believe MicroWin to program it is free now, maybe wrong believe it is.     I would add, if you want to learn this to understand Siemens, this was not a typical Siemens system, its original design was from Texas Instruments.
  9. Data Blocks

     L #Source_Word SLD 3 T #Source_Word   This is moving the address of the data word into a pointer format, a pointer would be a double word and includes the byte address and the bit address 0-7, the bit address takes the lowest 3 bits, therefore the programmer is shifting the bits, so in this case the value 226 is in pointer format 226.0. OPN DB[#DB_Source] is opening the DB identified by #DB_Source, which in this case is 50, therefore its opening DB50. L DBW[#Source_Word] is load the dataword identified by #Source_Word, in this case 226.0, therefore L DBW226. (If he had not shifted by 3 this would not have worked) OPN DB[#DB_Dest] T DBW[#Dest_Word]   is the same thing, he's opening the destination datablock and tranferring the value he's taken from DB50.DBW226  into this DW.  L #Source_Word L P#2.0 +D  T #Source_Word He's transferring more words, so he's incrementing to the next word, as its in pointer format he's adding pointer P#2.0, which means 226.0 + 2.0 = 228.0, therefore DBW228 will be the next one. He's added 2, as he is transferring Data Words, which is two bytes long, the next data word is two bytes away.   He does the same with the destination then does  L #Loop_Counter1 LOOP next This automatically decrements the value held in Loop_Counter1 which he initiated to a value of 2 (he's doing 2 loops) and jumps back to the label next Once Loop_Counter1 reaches zero it continues down where he increments the source DB to DB51 and offsets the destination word, so iot will be the same DB he writing to but further down.   L #Word_Dest //Increment Active Word number by Length L 2 //(2 x Length because off Byte number) +I  L 2 +I  T #Word_Dest for some reason he adds 2 twice rather than 4 :) Then loops back and moves another two words, same data words in the next DB {51) to the next two words in the destination DB                  
  10. Event ID 16# 494D STOP due to IO error

    Maybe start with a counter in each OB you've put in to see which is called. Remember Siemens advice not to have these OB's programmed all the time as its a risk to the system, they are meant to gather more information on the error. I would look to investigate the problem, fix it, then remove the OB;s or leave the counters and put in a STOP instruction.
  11. Event ID 16# 494D STOP due to IO error

    Check the CPU error message to find out what is not communicating. If you feel confident that nothing will be damaged by inhibiting the PLC from going tio STOP, you can program one of the OB's, I believe OB122 would probably be the one (the error message would confirm which OB it called I believe). This should stop the PLC from going to stop. You should then program in some code to catch the error. See page 1-64 of the manual I linked to for the error codes.
  12. Siemens

    This link is from 2013 and has some figures and external links
  13. Siemens

    This is a forum for people to search for help, your personal problems are your problems. Your comments show total ignorance and I wish the people who run this site could delete such threads. Siemens is the top PLC brand in the world for a reason, I too have worked with Germans on occasions, never found one who critisised or complained like a baby about them. Siemens is a very powerful PLC, so are the Rockwell PLC's, both are very good. There are some poor PLC's out there and neither of these are in that group. I'm wondering if you only write here when your drunk or something,
  14. Siemens

    Beyond you is it? Stick to lego or something down to your intellect.
  15. problem with Positive edge

    The question was not clear on that but I did cover the two buttons together at the end of my reply by stating that if that is what he is after, which normally a safety application, he would need more than what he has done. He would need to ensure that the buttons are pressed within a short time of each other. Also if it is a safety application he shouldn't be doing it in the PLC, unless it is a safety PLC, there are hard wired two button press safety relays
  16. Newbie questions

    The ADD instructions are either Integer or Floating Point, when using them the data you are entering should match. So if your using ADD_I for instance, both words adding and the result should all be created as Integer's. You can turn off type matching.
  17. problem with Positive edge

    Should be 'OR' not 'AND'. No need for one shot edge if its a normal start/stop. If your looking for a safety style start, two buttons together, then you would need bigger changes
  18. Problem with trigger camera Keynce with s7-1200

    Providing the first contact is ON and the test contact is OFF, the circuit you have there will turn on your output for 300mS every second. You may not see the signal on your meter. Have you tried basic commissioning. Disconnect the trigger wire in the camera and force the output ON and then check to see if you have voltage at the output and at the camera?
  19. The difference of Function and Function Block

    A Function Block is like a function but with memory and the Data Block is the memory. There is a bit more to it, some complex parameters can be passed to a Function Block but not a Function. For a Function, if you create a parameter as type IN, you cannot turn it on and use it in that state outside the block because the IN parameter is not passed back out, similar for the OUT, you cannot use the OUT bit as memory i.e. it cannot be used to retain itself. For these above you need an IN/OUT. The FB saves the state of even IN/OUT parameters in the DB. For an FB you do not need to assign any tags to the I/O parameters, you have to with a Functions. Functions are normally used where it does something and the result is in the one call, it could for instance be used as a calculation. Functions don't need parameters if you don't want, I'd usually use Functions as a central distribution for other block calls. Having no parameters for a FB makes no sense, I have actually seen someone do this and they ended up with an empty DB. Also if you unconditionally call a FB without a DB, it automatically uses whatever DB is already used as the instance DB.
  20. S7 Average Function

    You could use a clock pulse to load a table, add the value to a total and divide by the number of values in the table, once the table is full, start removing the oldest value and subtracting that value as you add the new value. Once full the divisor wouldn't change of course. In the libraries you'll find standard blocks like ATT (add to table) and FIFO (First in first out unload).
  21. S5 to AB ControlLogix

    first one +-] [-+-] [-+-] [-+-()-+ | | +-] [-------------+ second one +-] [-+-] [-+-] [-+-()-+
  22. CPU Clock

    There are SFB's to set and read the clock
  23. STL structure

    As jrw stated above,there is a clock byte available from within the CPU properties, you just need to enable it and select which marker byte (byte 0 is default) What I would so as standard to create single shots would be slightly different. L MB 0 == Clock Byte this scan L MB 1 == Clock Byte last scan XOW == Do an exclusive OR (only bits different remain ON) T MB 2 == One shots of changed bits L MB 0 T MB 1 == Update Clock Byte last scan Its slightly different in that it gives a one shot on every changed state so rising and falling edges rather than just rising edge. The clock memory bits are as follows Bit 0 M0.0 : 10Hz, 0.1s Bit 1 M0.1 : 5Hz, 0.2s Bit 2 M0.2 : 2.5Hz, 0.4s Bit 3 M0.3 : 2Hz, 0.5s Bit 4 M0.4 : 1.25Hz, 0.8s Bit 5 M0.5 : 1Hz, 1s Bit 6 M0.6 : 0.625Hz, 1.6s Bit 7 M0.7 : 0.5Hz, 2s So in the program I can use MB0 or MB1 bits as square pulse bits and MB2 as one shots, for example M 2.4 would give me a one shot every 400mS
  24. Recipe save message

    Normally when I've used recipe's, I have a recipe edit recipe, this is not used by the process. It can be read into by the operator and transferred to a working recipe. So if the operator wants to change a recipe, he would go to the edit recipe, read in the recipe that he wants to change, make his changes and then if happy transfer those changes from the edit recipe to the working recipe. Another method is to put in a are you sure? question.
  25. Step 5 PLC

    If the disks originate from a PG675 then they will be cpm format, not DOS. If you cannot find a PG675/685 you would need a later version of S5 that runs on a PC and someone who can convert the old cpm disks into the newer format. The PG675 had two floppy drives and no hard disk, the PG685 was a later version that had a hard drive and 1 floppy drive.