torstein Posted February 8, 2012 Report Share Posted February 8, 2012 Is it possible to read trends directly from a V570/V350 plc using the Unitronics .Net driver? Link to comment Share on other sites More sharing options...
Saragani Posted February 10, 2012 Report Share Posted February 10, 2012 Yes and no.... Yes, if you are saving the trends into SD and then use the Communication driver to read the trends file... but you will then need to do something with the file (You need some program that will open that file, for example SD Card Suite that converts it to USD files and then shows it on the PC, or converts it to CSV or Excel). No, if you don't want to use any software in order to understand the trend file. No, if you want to read the currently running trend without saving it to an sd card (Remote Operator does it, but it has a lot of logic on understanding what it reads, and it also requires a trend HMI element). Link to comment Share on other sites More sharing options...
viper_lasser Posted November 20, 2013 Report Share Posted November 20, 2013 I would like to read saved trend into sd card and show them directly on form in .net. Can anybody give some example in c# ? Maybe it will be easiler to save data for trends on sd card i.e. csv file by program in unitronics. Link to comment Share on other sites More sharing options...
Saragani Posted November 20, 2013 Report Share Posted November 20, 2013 Reading a file from the SD Card can be done using the .Net driver SD APIs. The SD Card explorer uses those same APIs After reading the files, you hit a wall, because we don't give any API of showing a trend on a UI. There is a small program that converts URT files into PDF. The sources are not published, but it can be stripped out to have a model that represents the trends and its curves. But you will still need some kind of User Control that will take that data and show it in the UI (WinForms or WPF) Link to comment Share on other sites More sharing options...
Saragani Posted November 21, 2013 Report Share Posted November 21, 2013 For reading files from the SD card, you will a PLC object. I believe you already know how to communicate with a PLC (using GetPLC etc). Now that you have a PLC object, called plc, you can write: plc.SD.ReadFile(SdFolder.DT_DT1, "Hello.utr", null); The SdFolder Enum is: public enum SdFolder { RootFolder = -1, ALARMS = 0, DT = 1, DT_DT1 = 100, DT_DT2 = 101, DT_DT3 = 102, DT_DT4 = 103, LOG = 3, SYSTEM = 4, USER_APP = 5, TRENDS = 6, TRENDS_TRENDS1 = 600, TRENDS_TRENDS2 = 601, TRENDS_TRENDS3 = 602, TRENDS_TRENDS4 = 603, SDBLOCKS = 9, EXCEL = 10, EXCEL_EXCEL1 = 1000, EXCEL_EXCEL2 = 1001, EXCEL_EXCEL3 = 1002, EXCEL_EXCEL4 = 1003, WEB = 11, } These are the folders that are used by unitroncis in the SD. There are other overloads to this function that also gets the folder as string (for example @"DT\DT1") You can also list the files on the SD, etc... just look at the set of APIs that the SD class exposes. Bte, the last parameter in the example I gave is a progress delegate, so if you want to have a progress car showing the download percentage, then use this delegate Link to comment Share on other sites More sharing options...
Saragani Posted November 25, 2013 Report Share Posted November 25, 2013 I have supplied a DLL that can translate UTR files into models: http://forum.unitronics.com/index.php?/topic/2630-alarms-from-sd-card/ Please try it Link to comment Share on other sites More sharing options...
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