This is my first program with Step 7 (300 series PLC) and I have to say it is extremely frusterating. And the fact that the company we bought the software package from took 2 weeks to get it to me and now I have had a few days to program my equipment (which now will not ship with a functional program and I have to actually try it on start up ).
Anyways, I have a couple outputs I need to cycle on and off with adjustable on and off times. Frankly I have found this to be a real pain in the *** to do as the old S5 timers only seem to take S5T data type for the timer value, and the IEC timers take a DINT of data type TIME which is in milliseconds; so then you cant do any math to the value. I can't have the user entering 5 minutes in milliseconds, but I can't multiply the TIME value by 10 either.
Could some one please help me on how to do handle timers properly in S7? I'm doing my best to throw out all AB thinking at this point, but I am really having difficulty with all these needlessly different data types.
A brief explanation of how to use DBs would be helpful too as I feel I should have this data which comes from the HMI in a DB. So far I have mostly just used the M address which I now find out is the wrong way to do things (Used these because my previous siemens experience is with the s7-200s I suppose). I don't understand if I need to call the DB to get the data out of it, or is there a way to just reference it. I'm clueless on DB's as the symbol table and M address seemed way easier.
Thanks in advance, hopefully someone can decipher this lol.
Anyways, I have a couple outputs I need to cycle on and off with adjustable on and off times. Frankly I have found this to be a real pain in the *** to do as the old S5 timers only seem to take S5T data type for the timer value, and the IEC timers take a DINT of data type TIME which is in milliseconds; so then you cant do any math to the value. I can't have the user entering 5 minutes in milliseconds, but I can't multiply the TIME value by 10 either.
Could some one please help me on how to do handle timers properly in S7? I'm doing my best to throw out all AB thinking at this point, but I am really having difficulty with all these needlessly different data types.
A brief explanation of how to use DBs would be helpful too as I feel I should have this data which comes from the HMI in a DB. So far I have mostly just used the M address which I now find out is the wrong way to do things (Used these because my previous siemens experience is with the s7-200s I suppose). I don't understand if I need to call the DB to get the data out of it, or is there a way to just reference it. I'm clueless on DB's as the symbol table and M address seemed way easier.
Thanks in advance, hopefully someone can decipher this lol.
Last edited: