Bryll

MrPLC Member
  • Content count

    349
  • Joined

  • Last visited

Posts posted by Bryll


  1. I uploaded a function to scale an analog value in integer format in the download section. It can be used instead of the standard Siemens "Scale" function, but it will give you the possibility to select the range of the input signal.

  2. File Name: Range_Fnc File Submitter: Bryll File Submitted: 17 Sep 2015 File Category: PLC Sample Code I sometimes need to scale an analog value, so I had to do a function to better suit my needs than Siemes "Scale" function. It has 5 inputs, all in integer format. _In - The value to be scaled _In_Min - Lowest value of the "_In" signal. _In_Max - Highest value of the "_In" signal. _Out_Min - Lowest allowed value of the scaled output. _Out_Max - Highest allowed value of the scaled output. The output "_Out" is the calculated value in integer format. Edit. It's saved as a global library. TIA Portal V13 SP1 Upd. 4 Click here to download this file

  3. Program complexity grows until it exceeds the capability of the programmer to maintain it. I used to swear like a sailor when using TIA Portal V11 and V12. With V13 is it only like a soldier. Never comment a program. If it was hard to write, it should be hard to read.
    1 person likes this

  4. Don't know if this is a PLC law, sounds more like a version of Murphy's law A software will only crash after several hours of work without saving or backing it up Used "Ctrl - S" constantly when using the earlier versions of Siemens TIA Portal. [PLC LAW 6.2 IN THE SOON TO RELEASE 2016 EDITION]


  5. Dear Inntele, Sorry if I was a bit unclear, but I tried to visualize what you recommended earlier with a picture (first picture). The second picture was to make Ron_S aware of the reduced speed when the connection of the first picture is used The communication speed might be sufficient even at 50%, but I agree with kaare_t that it's better to use an Ethernet connection. It will work whatever Ron_S decides to use. Sorry if this reply is a bit late, but I have been on a nice vacation.

  6. I had the same problem when stepping down from FX3U to FX3G. Don't know if it's the best way, but it works for me. Move D20 to 16 M-positions, MOV_M (D20, K4M0) turn on the bit M5 Move the M-positions back to your register, MOV_M (K4M0, D20) D20.5 is now on

  7. Got surprised again I'm reading information from a frequency drive and store the status word in D200, that's not a problem. But when trying to pick out the different status bits, like the running feedback status in D200.2 as a Boolean bit. The compiler refuses to accept it. There's no problem to move D200 to a range of M positions, but it seems to me that the FX3G was not the best choice of CPU. Or could this be changed by some setting for the compiler ? Let's see what next surprise will be

  8. Was a bit disappointed yesterday when I started to write the code for a FX3G CPU. Tried to make a tiny system a bit cheaper for one of my best customers, so I bought a FX3G instead of the FX3U I use as a standard in his systems. I noticed very soon that some of the instructions used in a structured text formula wasn't implemented in the 3G CPU. So instead of a nice short formula to calculate the evaporation and condensation temperature of NH3 from its pressure, was I forced to write a big memory consuming "look-up" table. Is there a list of what instructions FX3G doesn't have, but FX3U does have ? Searched for a while yesterday, but couldn't find any clear answers. Guess I have to be surprised again when writing the code

  9. What the energy meter will return as an example, is a reply for accumulated kWh with the size of 4 registers (signed) with the resolution of 0.01kWh. I could discard the two highest registers, but when the unit has been in operation long enough will I need the two upper registers to present a correct value. That will give me 21 474 836,47 kWh as the maximum value if I only use two registers. It might be enough for the first ten years of operation, so I'll go for it

  10. Need to read a couple of values from a ABB B24 energy meter via Modbus RTU. Some of the values occupies 4 registers (4 x 16 bits). Anyone with a good suggestion how to present this on the HMI before I start testing myself ? Working with GX IEC Dev. The HMI is a E1101

  11. If you create a FB and connects a DB to it, then you will have an instance DB. If you create a DB to store variables in, then you will have a DB with addresses for each tag/byte/word. You access them in your program by dragging them to the position or write the address directly like: DB100.DBX0.5 If you create an UDT, then you can access them by the label or drag and drop (no addresses). Might be wrong, since I'm just a beginner myself

  12. You must have a memory card inserted in the cpu. The Siemens memory card format is different from an ordinary memory card. Do not use anything else than a Siemens card, you might destroy things then.

  13. TIA-Portal for the 1200 and 1500 series. Step 7 (classic) for the S7-300 family, and if not using PCS7 also Step 7 for the S7-400. Was recommended by a Siemens sales rep. not to use the TIA-Portal for S7-300 and S7-400 PLC's