mulderm Posted December 24, 2008 Report Posted December 24, 2008 Hello, I known in RSLogix5 you can making a histogram and save it in a text-file. Is this also possible in WinCC flexible using VB-script? I want to make a histogram from 6 boolean inputs for 10 sec. long when I pressed a button and save it in a *.txt or *.csv file on my harddisk using WinCC Runtime. Any idea to do this? mulderm
Lewy Posted April 16, 2009 Report Posted April 16, 2009 Yes. I have an Excel Workbook that that let's you generate Timing-Diagrams (Histograms) from real-time data. Let me know if you are still interested.
mulderm Posted April 16, 2009 Author Report Posted April 16, 2009 Lewy, I am very interested! mulderm
JesperMP Posted April 17, 2009 Report Posted April 17, 2009 (edited) Hi mulderm. Yes, it can be done in VBS, provided you dont try to log too often. Less than every second, I say no can do. Every 1-2 seconds, maybe yes. Every 3 seconds and up no problem. I can find some info on how to do it with VBS if you insist. If you need to log values between 0.5-2 seconds, you should use the archiving function. It costs an archiving license, but that is how it is. edit: For logging data below 0.5 seconds, then you should use the PLC as the datalogger. You can then come down to for example every 20 msec. In WinCC Flex you can display the logged values as a "buffered" trend. edit again: If you need to log values as accurately as they change in the PLC, but for a very long time, then there is a comercial product (called AutoSpy I think). It uses the PLC as the logger, combined by continous upload and storage of the logged values. Edited April 17, 2009 by JesperMP
mulderm Posted April 17, 2009 Author Report Posted April 17, 2009 JesperMP, This option is what I want: edit: For logging data below 0.5 seconds, then you should use the PLC as the datalogger. You can then come down to for example every 20 msec. In WinCC Flex you can display the logged values as a "buffered" trend. Because I have 6 inputs (proximity switches) what will detect cams on a motor-axis. So I will see this in a histogram in about 10 sec by WinCC Flex (buffered trend?) Do you have a sample S7-300 program for this? Greetings, mulderm
JesperMP Posted April 19, 2009 Report Posted April 19, 2009 (edited) Hi again mulderm. I just found something that may be a problem. In Flex, a buffered trend can only display an array of INTs, BOOLs are not possible. It is possible to log the proximitor sensors as INTs, but it will eat some memory. For 100 msec cycle within 20 seconds, you need 1200 Words = 2.4 kB. If that is not too much I could send you a sample project. PM me you email. edit: Also, the amount of data to transfer to display the trends, means it will take a long time to display, or you need a fast connection (=ethernet via onboard CPU interface). Edited April 19, 2009 by JesperMP
JesperMP Posted April 19, 2009 Report Posted April 19, 2009 Hi again. It just dawned on me, that an alternative could be to let the PLC log the sensors as BOOLs, and then write a VBS script in Flexible to log all the values in a CSV file. In that way it will not take up so much memory. And you get the data in a file that you can view in Excel for example. Which one do you prefer ?
charlesm Posted April 19, 2009 Report Posted April 19, 2009 I do this on some of my projects as well. I buffer trend the data from the plc then I have a script that pulls all the values at once and saves them to a file. I collect the data with a SCL program in the plc. I am showing analog values however I would like to come up with a good idea on how to show digital i/o. I thought about just using int's making them 1 & 0 however with WinCC flex you can only have 8 pins so you can't show much at a time. If anyone has any good ideas to display bool values in a trend I would love to hear them.
JesperMP Posted April 20, 2009 Report Posted April 20, 2009 I have made a sample project for mulderm with exactly that solution. However, I stagger the trends so that they display neatly. Trend 1 = 0-1, trend 2 = 2-3, trend 3 =4-5 etc.For more than 8 pens, you can make more several trend displays in one screen.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now