Difference between revisions of "Connected Devices"

From Flowcode Help
Jump to navigationJump to search
Line 88: Line 88:
 
|-
 
|-
 
|Firmware
 
|Firmware
|
+
|{{Zip|MIAC_USB_Slave_Firmware.zip|MIAC USB Slave Firmware}}
|
+
|[http://www.matrixtsl.com/resources/files/software/programs/MIAC_AllCode_Component_Source.hex Firmware]
|
+
|[http://www.matrixtsl.com/resources/files/software/programs/Formula%20AllCode%20Firmware%20V3.zip Firmware]
|
+
|[https://www.matrixtsl.com/resources/files/software/drivers/RobotArmV2_USB_Driver.zip Firmware]
 
|-
 
|-
 
|Component Source
 
|Component Source
|
+
|{{Fcfile|MIAC_Slave.fcfx|MIAC PIC Slave Component}}
 
|
 
|
 
|
 
|
Line 100: Line 100:
 
|-
 
|-
 
|Examples
 
|Examples
|
+
|[[Component:_ID_eabeda20_432c_4554_80b3_5851d675a9e7#Examples|Examples]]
|
+
|[[Component:_ID_482486a9_7207_4b46_9e63_5c459534ab19#Examples|Examples]]
|
+
|[[Component:_ID_4182ece3_6ad5_41d3_a0e2_31bc570806db#Examples|Examples]]
|
+
|[https://www.matrixtsl.com/allcode/resources/ Examples]
 
|-
 
|-
 
|USB Driver
 
|USB Driver
 +
|{{Zip|MIAC_USB_Slave_Firmware.zip|USB Driver}}
 +
|{{Zip|USBSerial_Driver.zip|USB Serial Driver}}
 
|
 
|
|
+
|[https://www.matrixtsl.com/resources/files/software/drivers/RobotArmV2_USB_Driver.zip USB Driver]
|
 
|
 
 
|-
 
|-
 
! scope="col"| Basic I/O
 
! scope="col"| Basic I/O

Revision as of 08:36, 8 October 2020

Local and remote

When thinking about remote I/O devices, and customers’ needs, we think of different classes of device:

  • Local: Local devices connect to a PC using USB or Bluetooth.
  • Remote: Remote devices connect to a PC using Wi-fi, LAN or the internet.


Defined function and Flexible function

Local and remote devices can be off-the-shelf devices or can be custom made. Some connected devices will have defined functions – for example a remote thermostat, or an Ethercat connected sensor– and others will have flexible functions - for example a Labjack input output controller. Flexible function devices have an Application Programming Interface – API – that allows developers to design electronic systems.


Open source and closed source API

Some flexible function devices have a closed source APIs – for example the LabJack. This can not be edited. Other devices have open source code and you can edit the code and make the device behave as you wish. A good example of this is the Arduino, MIAC, ESP32 and other Matrix products: the APIs are written in Flowcode embedded and you are free to edit them.


Defined function API devices

There are many of these. Immediately available from Matrix are the following:

Hardware Platform MIAC PIC MIAC AllCode Formula AllCode Robot Arm v2
MCU Type PIC dsPIC dsPIC dsPIC
Slave Type AllCode AllCode AllCode AllCode
Communications
USB Y Y Y Y
Bluetooth Y Y Y
WIFI Y Y
Programming
Programming Method mLoader mLoader mLoader PC Loader
USB Y Y Y Y
Bluetooth Y
Firmware ZIP Icon.png

MIAC USB Slave Firmware

Firmware Firmware Firmware
Component Source FC6 Icon.png

MIAC PIC Slave Component

Examples Examples Examples Examples Examples
USB Driver ZIP Icon.png

USB Driver

ZIP Icon.png

USB Serial Driver

USB Driver
Basic I/O
Digital Input Pins 8 8
Motor Output Pins 4 4
Relay Output Pins 4 4 1
Analogue Input Pins 8 8
Protection Y Y
Features
UART/RS232/RS485/Modbus 1
CAN 1 1
PWM 2 4
Display Y Y Y
Sensors 1 1
Motors 2 4

These products have defined functions which simplifies their use: the I/O is defined by function not by pin output. This allows the creator to have an API command like ‘MOTOR 100’ rather than to define the PWM rate and then define which outputs are on.

Flexible function API devices

Immediately available from Matrix are the following:

Hardware Platform Arduino Uno Arduino Mega ECIO28P ECIO40P E-blocks2 BL0032 Raspberry Pi ESP32 Interface Board
MCU Type AVR AVR PIC PIC dsPIC Linux ESP32 PIC
Slave Type SCADA Slave SCADA Slave SCADA Slave SCADA Slave SCADA Slave SCADA Slave SCADA Slave SCADA Slave
Communications
USB Y Y Y Y Y Y Y
Bluetooth Y
WIFI Y Y Y
Programming
Programming Method AVRdude AVRdude mLoader mLoader mLoader SD Card / SSH ESP IDF PICkit
USB Y Y Y Y Y Y Y
WIFI / Ethernet Y Y
Firmware
Component Source
Examples
USB Driver
Basic I/O
Digital I/O Pins 14 54 19 30 47 26 32 17
Analogue Output Pins 2 1 1
Analogue Input Pins 6 16 10 14 13 14 3
Features
SPI 1 1 1 1 4 1 1 1
I2C 1 1 1 1 1 2 1
UART/RS232/RS485/Modbus 3 1 1 6 1 3 1
CAN 2
Bluetooth 1 1 1 1
WIFI 1 1 1 1
Ethernet/TCPIP/Modbus TCP 1
PWM 6 16 2 2 27 2 2 2

The source code for all of these is available – so you can manufacture your own local and remote flexible function device for use with Flowcode App Developer.

Using an API device in App Developer

Fixed Function devices

1. Connect the device to the PC via USB. Start a new App Developer programme. You may be able to load a template for the device which will preserve the settings in Flowcode and save you some time.

2. You will need to ensure that you have the appropriate driver installed

3. Open a 2D Dashboard panel. Select COMPONENT LIBRARIES…..API

4. Click and drag a ,for example, MIAC Allcode API onto the panel.

5. In Project Explorer click on Components and you will see the API icons that you can use to construct your program.

6. Construct the program

7. Select DEBUG…Go and your program should run on the slave device.


Flexible function devices

For example with Arduino Uno

1. Take an Arduino, Connect it to the PC using USB. You will need to ensure that you have the appropriate driver installed

2. Load the Flowcode API programme for the Arduino Uno into Flowcode Embedded and compile it to the Arduino. Your Uno with flexible function API is now ready for use.

3. Start a new App Developer programme. You may be able to load a template for the device which will preserve the settings in Flowcode and save you some time.

4. Open a 2D Dashboard panel. Select COMPONENT LIBRARIES…..API

5. Click and drag a SCADA(Arduino uno) API onto the panel.

6. In Project Explorer click on Components and you will see the API icons that you can use to construct your program.

7. Construct the program

8. Select DEBUG…Go and your program should run on the slave device.


API device source code and drivers

Matrix SCADA supports by default a selection of hardware devices with a built in API. Some devices have a basic or built in API and will not need firmware loading on to them, such as the PS2000 oscilloscope or K8055D Velleman I/O board. Other devices will need a API firmware loading on to them to allow the PC SCADA application to communicate with the firmware API. Most of the API's come as open source projects.


Device Manufacturer Comms Description Embedded Firmware Component Source Project Runtime Example Project USB Driver
FTD2XX FTDI USB General purpose USB driver chip N/A Available on request Examples FTDI Website
K8055D Velleman USB General purpose USB I/O board N/A Available on request Examples Velleman Website
PS2000 Pico Technology USB Oscilloscope N/A Available on request Examples Picotech Website
PL155-P TTI USB Power supply N/A Available on request Examples TTI Website
TG5011 TTI USB Signal generator N/A Available on request Examples TTI Website
Formula Allcode Matrix Bluetooth(SPP) Educational robot buggy Firmware N/A Examples N/A
MIAC Allcode Matrix RS232 / RS485 / Bluetooth(SPP) / WiFi General purpose industrial controller Firmware N/A Examples ZIP Icon.png

USB Serial Driver

MIAC PIC USB Slave Matrix USB General purpose industrial controller ZIP Icon.png

MIAC USB Slave Firmware

FC6 Icon.png

MIAC PIC Slave Component

Examples ZIP Icon.png

USB Driver

Arduino Uno Arduino USB Board level chip I/O device ZIP Icon.png

Arduino Uno SCADA Firmware

FC6 Icon.png

Arduino Uno SCADA Component

Examples Arduino IDE
ECIO28P Matrix USB Board level chip I/O device ZIP Icon.png

ECIO28P SCADA Firmware

FC6 Icon.png

ECIO28P SCADA Component

Examples ZIP Icon.png

USB Serial Driver

ECIO40P Matrix USB Board level chip I/O device ZIP Icon.png

ECIO40P SCADA Firmware

FC6 Icon.png

ECIO40P SCADA Component

Examples ZIP Icon.png

USB Serial Driver

Interface Board Rowland Technology USB / Bluetooth(SPP) / WiFi Board level chip I/O device Interface Board Firmware Component Source Examples USB Driver