Understanding Iso Pod What is Iso Pod Real

  • Slides: 78
Download presentation
Understanding Iso. Pod™ What is Iso. Pod™? • Real Time Controller – Iso. Max™

Understanding Iso. Pod™ What is Iso. Pod™? • Real Time Controller – Iso. Max™ for Multitasking – DSP Core for speed, 40 MIP’s – Motion Control features: PWM, Quadrature, Timers, A/D, GPIO, 2 SCI, 1 SPI, etc. – Networking features: CAN Bus V 2. 0 A/B • Size: 1. 2” x 3. 3” • Price: $99 single qty.

Iso. Pod™ Overview Hardware Connectors Software Applications Packages Select a link to the left

Iso. Pod™ Overview Hardware Connectors Software Applications Packages Select a link to the left to skip ahead to a topic or continue to the next page to see them all

Iso. Pod™ Overview • Here is a larger view of the graphic.

Iso. Pod™ Overview • Here is a larger view of the graphic.

1. Hardware Feature: LED’s • Three On Board LED’s – Red – Yellow –

1. Hardware Feature: LED’s • Three On Board LED’s – Red – Yellow – Green

2. Hardware Feature: GPIO • 16 General Purpose Input Output lines – PA 0

2. Hardware Feature: GPIO • 16 General Purpose Input Output lines – PA 0 - 7 – PB 0 – 7 – Programmable edge sensitive inputs

3. Hardware Feature: SCI • Serial Communication Interface (SCI) full-duplex serial channel – One

3. Hardware Feature: SCI • Serial Communication Interface (SCI) full-duplex serial channel – One RS-232 – One RS 422/485 – Programmable Baud Rates, • • • 38, 400 19, 200 9600 4800 1200

4. Hardware Feature: SPI • Serial Peripheral Interface (SPI) – Full-duplex synchronous operation on

4. Hardware Feature: SPI • Serial Peripheral Interface (SPI) – Full-duplex synchronous operation on fourwire interface – Master or Slave – Programmable # of bits

5. Hardware Feature: A/D • 8 -ch 12 -bit AD – Continuous Conversions •

5. Hardware Feature: A/D • 8 -ch 12 -bit AD – Continuous Conversions • 1. 2 us (6 ADC cycles) – Single ended or differential inputs – ADC can be sync’d with PWM

6. Hardware Feature: PWM • 12 -channel PWM module – 15 -bit counter with

6. Hardware Feature: PWM • 12 -channel PWM module – 15 -bit counter with programmable resolutions down to 25 ns – Twelve independent outputs, – or Six complementary pairs of outputs, or combinations – 8 Fault Inputs – 6 Current Status inputs

7. Hardware Feature: Timers • Sixteen Timers (eight may be used in quadrature) –

7. Hardware Feature: Timers • Sixteen Timers (eight may be used in quadrature) – – – 16 -bit timers Count up/down, Cascadable Pair for simple quadrature Pair for step and direction Programmable as input capture or output compare Input capture trigger rising edge, falling edge, or any edge – Output capture action Set, reset or toggle – External sync input

8. Hardware Feature: Quad. • Two Quadrature Decoder (uses eight timers) – – –

8. Hardware Feature: Quad. • Two Quadrature Decoder (uses eight timers) – – – 32 -bit position counter 16 -bit position difference register 16 -bit revolution counter 40 MHz count frequency (up to) Logic to decoder quadrature signals Configurable digital filter for inputs – Watchdog timer to detect stalled shaft

9. Hardware Feature: CAN • CAN 2. 0 A/B module for networking – Programmable

9. Hardware Feature: CAN • CAN 2. 0 A/B module for networking – Programmable bit rate up to 1 Mbit: Multiple boards can be networked (MSCAN) – Ideal for harsh or noisy environments, like automotive applications – CAN is a serial bus system especially suited to interconnect smart devices to build smart systems or sub-systems. Ref: http: //www. can-cia. org/can/

10. Hardware Feature: JTAG • JTAG port for CPU debugging – Examine registers, memory,

10. Hardware Feature: JTAG • JTAG port for CPU debugging – Examine registers, memory, peripherals – Set breakpoints – Step or trace instructions

11. Hardware Feature: COP • Watch Dog Timer • COP module • Low Voltage

11. Hardware Feature: COP • Watch Dog Timer • COP module • Low Voltage Detector for Reset – S 80728 HN

12. Hardware Feature: PWR Processor has special operating modes: • Low Voltage Mode •

12. Hardware Feature: PWR Processor has special operating modes: • Low Voltage Mode • Stop Mode • Wait Mode

13. Hardware Feature: DRV On Board level translation for • RS 232: MAX 3221

13. Hardware Feature: DRV On Board level translation for • RS 232: MAX 3221 • RS 422: MAX 3483 • CAN: TJA 1050 CAN Transceiver

14. Hardware Feature: REG On Board Voltage Regulation • LM 2937 5 V •

14. Hardware Feature: REG On Board Voltage Regulation • LM 2937 5 V • LM 3940 3. 3 V

Connector Overview J 1 Ser. , Power, General Purpose I/O Serial, Power, Ports PA

Connector Overview J 1 Ser. , Power, General Purpose I/O Serial, Power, Ports PA 0 – PA 7, PB 0 – PB 7 J 2 JTAG connector CPU Port J 3 SPI SCLK, MISO, MOSI, SS, PD 0, PD 1, PD 2, PD 3 J 4 RS-422/485 Serial Port -RCV, +RCV, -XMT, +XMT J 5 CAN BUS Network Port CANL, CANH J 6 Servo Motor Outputs x 12 PWM, +V, GND J 7 Motor Encoder x 2 Quadrature, Fault 0, Fault 1, Fault 2, IS 0, IS 1, IS 2 J 8 A/D Various A/D 0 – A/D 7, Various

Connector J 1 Ser. , Power, General Purpose I/O +VIN 24 1 SOUT GND

Connector J 1 Ser. , Power, General Purpose I/O +VIN 24 1 SOUT GND 23 2 SIN RST’ 22 3 ATN’ +5 V 21 4 GND PA 0 20 5 PB 0 PA 1 19 6 PB 1 PA 2 18 7 PB 2 PA 3 17 8 PB 3 PA 4 16 9 PB 4 PA 5 15 10 PB 5 PA 6 14 11 PB 6 PA 7 13 12 PB 7

Connector J 2 JTAG connector +3 V 1 2 GND TDI 3 4 GND

Connector J 2 JTAG connector +3 V 1 2 GND TDI 3 4 GND TDO 5 6 TMS TCK 7 8 DE RESET’ 9 10 TRST

Connector J 3 SPI +3 V 1 2 GND PD 0 3 4 SCLK

Connector J 3 SPI +3 V 1 2 GND PD 0 3 4 SCLK PD 1 5 6 MOSI PD 2 7 8 MISO PD 3 9 10 SS’

Connector J 4 RS-422/485 Serial Port N. C. 1 2 N. C. +RCV 3

Connector J 4 RS-422/485 Serial Port N. C. 1 2 N. C. +RCV 3 4 -RCV GND 5 6 GND -XMT 7 8 +XMT N. C. 9 10 N. C.

Connector J 5 CAN BUS Network Port N. C. 1 CANL 3 2 N.

Connector J 5 CAN BUS Network Port N. C. 1 CANL 3 2 N. C. 4 CANH N. C. 5 6 GND N. C. 7 8 N. C. 9 10 N. C.

Connector J 6 Servo Motor Outputs x 12 Sig. +V GND PWMB 5 1

Connector J 6 Servo Motor Outputs x 12 Sig. +V GND PWMB 5 1 2 3 PWMB 4 4 5 6 PWMB 3 7 8 9 PWMB 2 10 11 12 PWMB 1 13 14 15 PWMB 0 1 6 17 18 PWMA 5 19 20 21 PWMA 4 22 23 24 PWMA 3 25 26 27 PWMA 2 28 29 30 PWMA 1 31 32 33 PWMA 0 34 35 36

Connector J 7 Motor Encoder x 2 +5 V 24 1 FAULTA 0 GND

Connector J 7 Motor Encoder x 2 +5 V 24 1 FAULTA 0 GND 23 2 FAULTA 1 TA 0 PHA 0 22 3 FAULTA 2 TA 1 PHB 0 21 4 ISA 0 TA 2 IND 0 20 5 ISA 1 TA 3 HM 0 19 6 ISA 2 +5 V 18 7 FAULTB 0 GND 17 8 FAULTB 1 TB 0 PHA 1 16 9 FAULTB 2 TB 1 PHB 1 15 10 ISB 0 TB 2 IND 1 14 11 ISB 1 TB 3 HM 1 13 12 ISB 2

Connector J 8 A/D Various ANA 0 24 1 +5 V ANA 1 23

Connector J 8 A/D Various ANA 0 24 1 +5 V ANA 1 23 2 IRQA’ ANA 2 22 3 IRQB’ ANA 3 21 4 FAULTB 3 ANA 4 20 5 FAULTA 3 ANA 5 19 6 PD 5 ANA 6 18 7 TC 0 ANA 7 17 8 TC 1 VSSA 16 9 CLKO VREF 15 10 RSTO’ GND 14 11 RD’ V+ 13 12 WR’

Iso. Pod™ comes with Iso. Max™

Iso. Pod™ comes with Iso. Max™

Other Languages • • • The Iso. Pod™ can be programmed in languages other

Other Languages • • • The Iso. Pod™ can be programmed in languages other than Iso. Max™. Metrowerks sells Code Warrior, a professional level C language IDE Max-FORTH is available now from NMI. Small C is under development Assembler is under development BASIC is planned for the future

Real Time Programming A real time program is one that waits. Any program that

Real Time Programming A real time program is one that waits. Any program that does not wait on something is not a real time program. Any program that waits on something, other than the program itself, is a real time program.

Conventional Language In an ordinary high level language, such as C, BASIC, FORTH or

Conventional Language In an ordinary high level language, such as C, BASIC, FORTH or JAVA, programs are written flowing from top to bottom. Flow charts are the preferred diagramming tools. A program that must wait on something, simply loops in place. Most conventional languages follow the structured procedural programming paradigm. Structured programming enforces this style of waiting.

Program Counter Capture (PCC) The Program Counter Capture, is when the program branches backwards

Program Counter Capture (PCC) The Program Counter Capture, is when the program branches backwards on itself to wait. In Structured Programming, the Program Counter Capture is used to implicitly hold state (wait) information. This information is better kept elsewhere (explicitly).

Conventional Multitasking In a conventional language getting several things done at the same time

Conventional Multitasking In a conventional language getting several things done at the same time is tricky. Most programmers must use a Real Time Operating System. A Multitasking Operating System adds much overhead and complexity for switching tasks/contexts.

Concept of Isostructure The word, Isostructure, has two roots: Iso, meaning equal or “on

Concept of Isostructure The word, Isostructure, has two roots: Iso, meaning equal or “on the same level, ” and structure, from the current usage in the Computer Science. Isostructure is structure with no backwards branches, and an enhanced way to branch in multiple forward directions (called polyfurcation) similar to a case statement.

Multitasking vs. Isostructure If Program Counter Capture (PCC) Loops can be avoided, compatible thread-like

Multitasking vs. Isostructure If Program Counter Capture (PCC) Loops can be avoided, compatible thread-like programs can be interwoven.

Isostructure and Flow Charts A simple structured flow chart can sometimes be replaced by

Isostructure and Flow Charts A simple structured flow chart can sometimes be replaced by alternatively styled Isostructured flow charts as shown above. Complex flow charts are too difficult. Structured program was intended to end spaghetti code. Non Isostructure can lead to unruly intertwines of if-then statements. A different programming paradigm is needed.

Finite State Machines A better way to represent a real time program is with

Finite State Machines A better way to represent a real time program is with a Finite State Machine. Iso. Max is a programming language based on Finite State Machine (FSM) concepts applied to software, with a procedural language (derived from Forth) underneath it. The closest description to the FSM construction type in Iso. Max™ is a “One. Hot” “Mealy” type of Timer-Augmented Finite State Machines.

New Paradigm Iso. Max™ is a new language. Why learn a new language? Because

New Paradigm Iso. Max™ is a new language. Why learn a new language? Because the old languages cannot do what Iso. Max™ can. Old languages are based on, and reinforce, structured programming. Iso. Max™ is based on Isostructured programming. No other language has fully interactive, highlevel, real time programming. Iso. Max™ has a new programming paradigm, simply not available any where else.

Iso. Max™ Language The breakthrough in Iso. Max™ is the language is inherently “multitasking”

Iso. Max™ Language The breakthrough in Iso. Max™ is the language is inherently “multitasking” without the overhead or complexity of a multitasking operating system (no PCC’s allowed). In Iso. Max™ anyone can write simple machines and string them together so they work.

Iso. Max™ Programming You can draw state diagrams instead of flow charts, and then

Iso. Max™ Programming You can draw state diagrams instead of flow charts, and then translate the diagrams directly into their state machine equivalents. To program in Iso. Max™ you use text to create state machines. The state machines can then run in the Virtually Parallel Machine Architecture (VPMA).

Iso. Max™ Machines Each machine in the program is like a hardware component in

Iso. Max™ Machines Each machine in the program is like a hardware component in a mechanical solution. When satisfied with its performance, you install the new machine in a chain of machines. The machine becomes a background feature of the Iso. Pod™ until you remove it. All tasks are handled on the same level within the machine chain, each running like its own separate little machine.

Create the machine There are five steps to creating a machine in Iso. Max™

Create the machine There are five steps to creating a machine in Iso. Max™ text: • Name the machine • Identify the machine • Append states to the machine • Describe transitions between states • Test and install

Name the machine The first program line, tells Iso. Max™ to add a new

Name the machine The first program line, tells Iso. Max™ to add a new virtual machine. (Any group of characters without a space or a backspace or return will do for a name. Use up to 32 characters. Here the syntax is MACHINE followed by the chosen name. ) MACHINE <name 1> State Flowchart

Identify the machine Second program line, identify as the machine to append to. The

Identify the machine Second program line, identify as the machine to append to. The syntax to do this is to say ON-MACHINE and the name of the machine to work on, which looks like this: ON-MACHINE <name 1> State Flowchart

Append states to the machine States are the fundamental parts of our virtual machine.

Append states to the machine States are the fundamental parts of our virtual machine. A state is a place where the computer’s outputs are stable, or static. Said another way, a state is place where the computer waits. Add states to the machine with a name. The syntax is APPEND-STATE followed by another made-up name. APPEND-STATE <name 2> APPEND-STATE <name 3> etc. State Flowchart

States Are Waits A real time program is one that waits. A state machine

States Are Waits A real time program is one that waits. A state machine has states, which are explicit places where machines wait. States are static. States are not where the processor “does” something, they are where the processor “doesn’t” do anything, but wait… except to see if it is time to stop waiting.

Describe transitions between states The rule for changing states along with the action to

Describe transitions between states The rule for changing states along with the action to do, if the rule is met, is called a “Transition”. A transition contains: - the name of the “State” the rule applies to. - the rule, which is called the “Condition”; this is the “when to stop waiting” - the action; “the what to do then”State Flowchart - the name of the “State” to go to is “where to wait after that”.

Transition syntax as normally used IN-STATE <name of state> CONDITION <procedural Boolean> CAUSES <procedural

Transition syntax as normally used IN-STATE <name of state> CONDITION <procedural Boolean> CAUSES <procedural action> THEN-STATE <name of next state> TO-HAPPEN

Transition syntax with extra comments IN-STATE ( the State the rule applies to )

Transition syntax with extra comments IN-STATE ( the State the rule applies to ) <name of state> CONDITION ( when to stop waiting ) <procedural Boolean> CAUSES ( what action to do ) <procedural action> THEN-STATE ( where to wait after that ) <name of next state> TO-HAPPEN ( ends this Transition definition )

Transitions Details A transition has four components; . 1) which state it starts in

Transitions Details A transition has four components; . 1) which state it starts in 2) the condition necessary to leave 3) the action to take when the condition becomes true 4) the state to go to. ; . Why are transitions so verbose? The structure makes the transitions easy to read in human language. ; . The constructs IN-STATE, CONDITION, CAUSES, THEN-STATE, and TO-HAPPEN are like the five brackets around a table of four things.

Test and install Iso. Max™ is interactive. The machine can be defined and tested

Test and install Iso. Max™ is interactive. The machine can be defined and tested in the foreground, and once performance is assured, it can be installed in the machine chain to run with all other machines in the background scheduled machine list. To truly understand Iso. Pod™ requires understanding how interactivity speeds development. Test the code as it runs, where it runs, while it runs, in real time.

Sample Machine: Thermostat A thermostat makes a convenient example. The machine is named, Thermostat

Sample Machine: Thermostat A thermostat makes a convenient example. The machine is named, Thermostat 1. MACHINE Thermostat 1 The machine is identified, ON-MACHINE Thermostat 1 The states added, APPEND-STATE Wait-on-low-temp APPEND-STATE Wait-on-high-temp

Sample Transitions: Thermostat IN-STATE wait-on-low-temp CONDITION too-cold? CAUSES heater-on THEN-STATE wait-on-high-temp TO-HAPPEN IN-STATE wait-on-high-temp

Sample Transitions: Thermostat IN-STATE wait-on-low-temp CONDITION too-cold? CAUSES heater-on THEN-STATE wait-on-high-temp TO-HAPPEN IN-STATE wait-on-high-temp CONDITION too-hot? CAUSES heater-off THEN-STATE wait-on-low-temp TO-HAPPEN

The State Diagram State Machine program execution can easily be made to be multitasking.

The State Diagram State Machine program execution can easily be made to be multitasking. State diagrams contain more information with less confusion. State Flowchart

Equivalent State Diagram for Thermostat

Equivalent State Diagram for Thermostat

Sample Comparison Elements in all 3 Chart 1. 2. 3. 4. 5. 6. 7.

Sample Comparison Elements in all 3 Chart 1. 2. 3. 4. 5. 6. 7. 8. Wait until too cold Action when too cold (heater on) Where to go next Wait until too hot Action when too hot (heater off) Where to go next Condition for leaving (too cold) Condition for leaving (too hot)

Sample Comparison 1 of 3 State Machine vs. Flow Chart 1 to o _

Sample Comparison 1 of 3 State Machine vs. Flow Chart 1 to o _ c o ld ? 3 h e a r te r _ o n 2 7 w a it_ o n w a it _ o n lo w _ te m p h ig h _ te m p 4 to o _ w a rm ? 6 h e a r te r _ o ff 5 8

Sample Comparison 2 of 3 Isostructured Flow Chart s ta rt 1 h e

Sample Comparison 2 of 3 Isostructured Flow Chart s ta rt 1 h e a te r yes ro o m a a o ff? 8 yes 2 3 tu rn o n to o c o ld ? h e a te r a 7 4 ro o m a to o h o t? yes 5 6 tu rn o ff h e a te r a

Sample Comparison 3 of 3 Structured Flow Chart start 1 too cold? no 7

Sample Comparison 3 of 3 Structured Flow Chart start 1 too cold? no 7 2 turn on heater 3 4 too hot? no 8 5 turn off heater 6

Sample Comparison of Elements State Machine vs. Flow Chart start 1 too_cold? 3 hearter_on

Sample Comparison of Elements State Machine vs. Flow Chart start 1 too_cold? 3 hearter_on 7 2 wait_on low_temp wait_on high_temp 4 1 8 too cold? 7 too_warm? 6 heater a off? 8 2 hearter_off start 5 yes 7 1 room a too cold? yes no 2 turn on heater 3 turn on heater a 3 4 too hot? no 8 4 room a too hot? yes 5 turn off heater a 6 5 turn off heater 6

Typical Iso. Pod™ Applications • • Real Time control Embedded DSP Instrumentation Process Control

Typical Iso. Pod™ Applications • • Real Time control Embedded DSP Instrumentation Process Control Network Control SCADA Motion Control Robotics!

Typical Mobile Robot 1: Hexapod: 6 legged walker • Locomotion: 18 RC Servos –

Typical Mobile Robot 1: Hexapod: 6 legged walker • Locomotion: 18 RC Servos – 12 Hardware PWM 4 Timer PWM • Ranging: 2 RC Servos Pan and Tilt – 2 Timer PWM – 1 Timer pulse measurement • Foot sensors – 6 A/D channels: Pressure

Typical Mobile Robot 2: Roller: RC Servo • Locomotion: 2 RC Servos – 2

Typical Mobile Robot 2: Roller: RC Servo • Locomotion: 2 RC Servos – 2 Hardware PWM • Ranging and Sensing – up to 10 sensors on RC Servos – 13 Timers for pulse measurement – 8 A/D channels

Typical Mobile Robot 3: Roller: DC Servo • Locomotion: 2 DC Servos – 8

Typical Mobile Robot 3: Roller: DC Servo • Locomotion: 2 DC Servos – 8 Hardware PWM – 2 Quadrature feedback (4 Timer lines) • Ranging: up to 4 sensors on RC Servos – 5 Timers for pulse measurement – 8 A/D channels T. B. D.

Simple connection Hook up for development and programming.

Simple connection Hook up for development and programming.

Iso. Max™ Communications Programming and interaction with Isomax™ software is text based via the

Iso. Max™ Communications Programming and interaction with Isomax™ software is text based via the serial channel. A simple terminal program on PC makes efficient development system. Text can be hand entered via terminal, copied from a text editor, or downloaded from a file (*. txt). It’s easy! Max. Term program available for download, from New. Micros.

Sample of Maxterm Screen

Sample of Maxterm Screen

Sample of Words on Maxterm Screen

Sample of Words on Maxterm Screen

Sample of Programming on Maxterm Screen

Sample of Programming on Maxterm Screen

Sample of Maxterm Help Screen

Sample of Maxterm Help Screen

Iso. Pod™ Board by itself w/Iso. Max™ installed. (without cable or transformer) • Price

Iso. Pod™ Board by itself w/Iso. Max™ installed. (without cable or transformer) • Price $99 Order Page

Quick Kit provides Iso. Pod™, custom made serial cable and DC wall transformer with

Quick Kit provides Iso. Pod™, custom made serial cable and DC wall transformer with special connector. Price: $114 Order Page

Development Kit provides Iso. Pod™, Controller interface board with 2. 4" x 3. 6"

Development Kit provides Iso. Pod™, Controller interface board with 2. 4" x 3. 6" breakable prototype area, serial cable and wall transformer • Price: $149 Order Page END

“One Hot” • "One Hot" is a description of an optimization of a state

“One Hot” • "One Hot" is a description of an optimization of a state machine in hardware that has an output per state. So rather than the state number being a combination of bits, like a counter, which points to a state, there is one unique output per state. more on web BACK

“One Hot” continued • Iso. Max™’s software equivalent is the state number. Iso. Max™

“One Hot” continued • Iso. Max™’s software equivalent is the state number. Iso. Max™ uses precomputed GOTO’s. When the scheduler executes a machine, it doesn't have to test the state number to find which state it is in, but vectors directly to it. It is the only “hot” state. BACK

“George H. Mealy” • "Mealy" was a pioneer in state machine descriptions (1955). Usually

“George H. Mealy” • "Mealy" was a pioneer in state machine descriptions (1955). Usually a machine is described as either “Mealy” or “Moore” machine, depending on how outputs are done. Moore thought the states themselves do the output (more suitable to a hardware implementation). Mealy thought the transitions do the output (more appropriate for software). BACK

“Mealy” continued 1 For Iso. Max™ the Mealy machine design is preferred on principle.

“Mealy” continued 1 For Iso. Max™ the Mealy machine design is preferred on principle. If a state is a wait, and static as its name implies, it shouldn't be doing anything active (no outputs). Doing something active (making or changing outputs) should be limited to the transition between states (Mealy, not Moore). BACK

“Mealy” continued 2 In a Mealy machine, the transitions do the output. So the

“Mealy” continued 2 In a Mealy machine, the transitions do the output. So the state number wasn't necessarily the output. Consequently, a Mealy machine can have two states with identical outputs, but a different state number. A Moore machine cannot. more on web BACK

Timer-Augmented Rodney Brooks of MIT AI Lab fame prefers Finite State Machines for modeling

Timer-Augmented Rodney Brooks of MIT AI Lab fame prefers Finite State Machines for modeling robot behavior. But he likes to augment the FSM’s with timers. He calls these Timer-Augmented Finite State Machines. Timers in the Iso. Pod™ and LOOPVAR’s in Iso. Max™ can be used to augment the FSM’s in this way. BACK