Data Manipulation Overview and Applications. Agenda Overview of LabVIEW data types Manipulating LabVIEW data types –Changing data types –Byte level manipulation.

Slides:



Advertisements
Similar presentations
INSTRUCTION SET ARCHITECTURES
Advertisements

Chapter 4 : File Systems What is a file system?
LV2IDL, a software package for automatic data transfer between LabVIEW and IDL Gelu M. Nita New Jersey Institute of Technology.
File Systems.
Memory and Files Dr. Andrew Wallace PhD BEng(hons) EurIng
Avoiding Measurement Errors from Manipulating Data in Software
Chapter 3 Data Representation.
Ceng Operating Systems
Chapter 3 Data Representation. Chapter goals Describe numbering systems and their use in data representation Compare and contrast various data representation.
Chapter 1 Data Storage. 2 Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns.
2 Systems Architecture, Fifth Edition Chapter Goals Describe numbering systems and their use in data representation Compare and contrast various data.
Lecture 23 Symmetric Encryption
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Memory Allocation CS Introduction to Operating Systems.
Practical Techniques for Searches on Encrypted Data Yongdae Kim Written by Song, Wagner, Perrig.
Machine Instruction Characteristics
IT253: Computer Organization
Internet Addresses. Universal Identifiers Universal Communication Service - Communication system which allows any host to communicate with any other host.
Pengantar Teknologi Informasi dan Ilmu Komputer Information Technology and Data Representation PTIIK- UB.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Cis303a_chapt03-2a.ppt Range Overflow Fixed length of bits to hold numeric data Can hold a maximum positive number (unsigned) X X X X X X X X X X X X X.
1 INFORMATION IN DIGITAL DEVICES. 2 Digital Devices Most computers today are composed of digital devices. –Process electrical signals. –Can only have.
IT253: Computer Organization Lecture 3: Memory and Bit Operations Tonga Institute of Higher Education.
File Structures Foundations of Computer Science  Cengage Learning.
Cracking DES Cryptosystem A cryptosystem is made of these parts: Two parties who want to communicate over an insecure channel An encryption algorithm that.
Advanced Windows 8 Apps Using JavaScript Jump Start Exam Prep M5: Data, Files, and Encryption Michael Palermo Microsoft Technical Evangelist Jeremy.
Cryptography Team Presentation 2
1 Challenge the future Matlab Handling Large Data Sets Efficiently in MATLAB ®
Description of a New Variable-Length Key, 64-Bit Block Cipher (BLOWFISH) Bruce Schneier BY Sunitha Thodupunuri.
Computer Organization and Assembly Language Bitwise Operators.
File Storage Organization The majority of space on a device is reserved for the storage of files. When files are created and modified physical blocks are.
TE/CS 536 Network Security Spring 2005 – Lecture 8 Security of symmetric algorithms.
Overview and Applications
Lecture 23 Symmetric Encryption
Lecture 18 Windows – NT File System (NTFS)
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Digital Representations ME 4611 Binary Representation Only two states (0 and 1) Easy to implement electronically %0= (0) 10 %1= (1) 10 %10= (2) 10 %11=
Lecture 10 Page 1 CS 111 Summer 2013 File Systems Control Structures A file is a named collection of information Primary roles of file system: – To store.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
Programming Configuration Files in LabVIEW David Thomson Systems Integrator Original Code Consulting National Instruments Alliance Member Research Scientist.
PQDIF PQDIF: A Technical Overview Prepared by: Erich Gunther, Bill Dabbs, and Rob Scott Electrotek Concepts, Inc. NEW! IMPROVED!
CSE 351 Number Representation. Number Bases Any numerical value can be represented as a linear combination of powers of n, where n is an integer greater.
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
09/06/ Data Representation ASCII, Binary Denary Conversion, Integer & Boolean data types.
THE CODING SYSTEM FOR REPRESENTING DATA IN COMPUTER.
Chapter 3 Data Representation
Data representation How do we represent data in a digital system?
Multiple Platters.
Microprocessor Systems Design I
Data Types, Arithmetic Operations
Data Representation in Computer Systems
File System Structure How do I organize a disk into a file system?
Other Kinds of Arrays Chapter 11
Main Memory Management
Introduction to LabVIEW
Chapter 1 Data Storage.
CS Introduction to Operating Systems
Computer Data Types Basics of Computing.
Bits and Bytes Topics Representing information as bits
Chapter 9 Instruction Sets: Characteristics and Functions
File Storage and Indexing
Fundamentals of Python: First Programs
Data representation How do we represent data in a digital system?
Comp Org & Assembly Lang
Data representation How do we represent data in a digital system?
Simple Hash Functions Network Security.
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

Data Manipulation Overview and Applications

Agenda Overview of LabVIEW data types Manipulating LabVIEW data types –Changing data types –Byte level manipulation of data –Bit level manipulation of data Applications involving data manipulation –Data encryption –Instrument I/O

Byte Unsigned Byte Word Unsigned Word Long Unsigned Long Single Precision Double Precision Extended Precision 8 bits 16 bits 32 bits 8 bytes Sun: 16 bytes Windows/Linux: 10 bytes Power Mac: Double/Double 4 bytes LabVIEW Data Types: Numeric

LabVIEW Data Types: Arrays Stored as handles containing: –Size of each dimension (in unsigned long integers, U32s) –Data (size of elements varies but is consistent through array) To align data correctly, a few bytes of padding may be added before the first element of data Array is a continuous block of memory 1D array of SGLs 4D array of I16s

LabVIEW Data Types: Others Booleans: 8 bits –All zeros = FALSE, nonzero = TRUE Strings: 1D array of unsigned bytes Array of Strings: array of U32 handles to string locations Paths: handles containing path type and number of path components in U16s –Byte 0,1: 0 (abs), 1(rel), 3 (UNC) –Byte 2,3 # of path components

LabVIEW Data Types: Clusters Data stored according to cluster order Scalar data stored directly in cluster Arrays, strings, and paths stored as a handle to the memory location where the data is stored Padding may need to be added, depending on OS Example: cluster of SGL, EXT, and 1D array of U16s WindowsMacSun

Flattened Data Flat data takes up a continuous block of memory –Scalar and array numerics are flat –Strings are flat –Arrays of strings are not flat –Clusters may be flat (if simple numerics, for example) During File I/O LabVIEW automatically flattens all data to ease storage to disk Flatten/Unflatten to/from String functions perform the same operations in memory

Flattened Data Flattened data normalized to standard form for platform independence –Numeric data in big endian form (MSB first) Windows apps may need to be little endian – swap bytes –Sun format for extended precision numbers Flattened form does not have data encoding –When unflattening, data type needs to be known –Type descriptor used to define data type *demo

Type Descriptors Sequence of word integers that can describe any data type in LabVIEW. – I16 size in bytes (including length word) – description of data –Some additional info may follow type code –Arrays and clusters structured (since there are other data types) –Can quickly get complicated to decipher *demo

Changing LabVIEW Data Types Typecast –Change data type of information –Works with flat data, 1D arrays of flat data, and strings –Default type is string Flatten/Unflatten to/from String –Work with all data –Behaves like LabVIEW internal flatten function *demo

Byte Level Data Manipulation Split / Join numeric values into new data Swap Bytes/Words to reorder existing data Convert data to unsigned bytes/words/longwords to manipulate at the byte level Convert data to strings to use string functions for manipulation *demo

Bit Level Manipulation Rotate Left / Right with Carry to move bits and effect other values Rotate to move bits within a value Logical shift moves bits, putting 0s in their place Turn data into unsigned bytes to use these functions easily For custom bit manipulation turn data into Boolean arrays *demos (2)

Applications of Data Manipulation - Encryption Standards exist for process (NIST, private corporation, etc) –Scrambled data is called ciphertext, unscrambled data plaintext –Data often encrypted using a key – usually a specific number of random bits and error checking bits Ex: 64 bit key: 56 data bits, 8 parity bits (one per byte of key data) Symmetric-key (Private Key): each user has access to the same key –Pro: can be very fast –Con: easier to compromise (one key to compromise) Public-key: each user has a public and private key All sorts of algorithms exist to encrypt data (DES, IDEA, Blowfish, etc) Web has a good source of intro pages –

How to Encrypt Data? Hook a 3 rd party DLL (or ActiveX control) into LabVIEW using the Call Library Node (complexities, speed, usability, etc) Grow your own –Probably not as secure (but good enough?) –Probably easier to implement/understand –Some options: Simple bit shifting Key ciphering with your own algorithm (ex: passwords) Implementation of known algorithm in native G-code *demos (3)

Applications – Instrument I/O Instruments (GPIB, ethernet, RS-232, etc) can often transfer data to a host PC in a variety of formats –ASCII: easiest to read but largest byte transfer –Binary: more difficult to use but much more compact Will probably need to typecast data after it is received My need to byte swap data Use binary transfers for faster data transfers When possible, pick the smallest data type for transfer

Applications - Waveform Transfers ASCII Waveforms Binary Waveforms –1-byte integers –2-byte integers

Questions?