3/11/2022 7:26 PM | |
Joined: 3/24/2009 Last visit: 8/7/2023 Posts: 406 Rating: (3) |
Hello Everyone, I need to generate random value from 3.0 to 4.0 and 0.9 to 1.6 in the interval of 1s. I need this logic for testing purpose. I used tag simulator to generate this, it is working fine. But the problem is every time I have to start it manually. Let say if my pump is on then I need to generate this random value. When the pump is off then it should not give any value. I found multiple threads on this, I tried but not successful. I took the project from the below link Tool collection of functions for bit, number and mathematical operations - ID: 29851674 - Industry Support Siemens but here I am getting random values only from 0 to X STL/FBD/LAD solution will be helpful for me Thanks |
All is well :-) |
|
3/13/2022 5:06 PM | |
Joined: 3/30/2020 Last visit: 11/8/2024 Posts: 4938 Rating: (1010) |
Hello. You are not stating which PLC & software you are using. That is a hinderance. The resource you found is already useful. Write a little code that transforms the value you already have to the range you need it to be. The resource you have is a value between -32768 and +32767. Another resource: Library of general functions (LGF) for SIMATIC STEP 7 (TIA Portal) and SIMATIC S7-1200 / S7-1500 :: LGF_Random_Real() ~ |
Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
Follow us on