
- Introduction
- Tutorial videos
- Getting started with myDESIGNER
- Checking project
- Projects’ visual appearance
- GUI/HMI Editor
- Creating views
- Selecting objects
- Drawing primitives
- Creating text elements
- Inserting images
- Poly-lines
- Moving objects
- Resizing objects
- Rotating objects
- Skewing objects
- Filleting
- Combining objects
- Fill and stroke
- Rulers and guides
- Layers
- Copying and pasting elements
- Object's order
- Grouping
- Repeated actions mode
- View scripting
- Used tags
- Zooming on zone
- Undo and redo
- View properties
- Components
- Components library
- Active area
- Layout views
- Entering tags and math expressions
- Tree tags database
- Formatting numerical values
- Linking views with PLC
- Time Sequence
- Open command
- Write/Set command
- Scaling set values
- Key shortcuts
- On touch
- Parametric views
- View scripts
- Using script in views
- Equations in view script using parameters
- Declaring variables
- Script writing
- Using variables in animations and effects
- Debugging view scripts
- Using debug screen on your view
- Using web browsers integrated debugger
- Using JavaScript libraries - Includes
- Linking external JavaScript libraries – Remote includes
- View scripts - list of functions
- Dealing with elements
- ListBox, TextBox and ComboBox functions
- View scripts animations
- View scripts effects
- Error frames
- View scripts zoom
- View scripts open command
- Users, language and login
- Retrieving files
- Communicating with server side scripts
- View scripts tables
- Alarms and aggregated alarms
- Data - Log data
- Custom charts
- Tag info
- Other useful functions
- Documents
- Reports
- CAS alarms
- Data logging
- Data - Log views
- Aggregated data logs
- Advanced trends
- Connections
- User accesses
- Multi - language support
- * Server-side scripts
- Server-side scripts folder
- Server-side scripts folder structure
- Variables tables
- Script data-logs
- Global variables
- Sources folder
- Organizing project into modules
- Importing modules
- Using the event-driven asynchronous callbacks
- Creating server side reports
- mySCADA specific functions
- Debugging
- Script status (on myBOX devices only)
- Ser2Net (on myBOX devices only)
- View and server side scripts – common tasks
- Graphical guides
- Read/Write data from/to PLC
- Generating report
- Other guides
- Server side scripts – examples
- Reading data from PLC
- Writing data into PLC
- Timers – eg. run code in given time intervals
- Scheduled execution e.g run code every Monday at 2:00 PM
- Generating a report at given time interval
- Limiting access to generated files
- Processing data-log data
- Exporting data-log data into CSV files
- Using virtual PLC
- Sending data from view script into server side scripts
- Devices
- EtherNet/IP driver
- MicroLogix and SLC driver
- Modbus driver
- Siemens S7 family PLCs driver
- OPC UA driver
- MELSEC-Q driver
- SigFox driver
- KNX driver
- Databases driver
- Export/Import in .CSV files
- Download/Upload from/to device
- * Recipes
- * Running hours
- * Timeline
- * mySCADA TIA portal connector
23.13.Data - Log data #
You can retrieve data from data-logs using following function:
myscada.readDatalogData(options,callback);
To use this function, please use a visual dialog located in the editor top bar.
Example:
//read historical data from data-log options={}; options['dlgid']=1; options['tags']=[1]; options['timeFrom']=new Date()/1000-60*60; options['timeTo']=new Date()/1000; options['limit']=1000; myscada.readDatalogData(options, function(err,result){ //process each row of returned data for (i=0;i{ var date=result[i].datetime; var value0=result[i][1]; //first (first@script) } });