Test and Measurement Forum

PICOLOG ALARMS DRIVE FAST ARDUINO ACTION

Forum for discussing PicoLog

IS THIS ALARM DETECTION SERIES EASY TO IMPLEMENT?

Poll ended at Sun Feb 26, 2017 9:19 pm

1. NEED MORE DETAILED EXPLANATIONS.
0
No votes
2. DESCRIPTIONS TOO OBVIOUS, MAKE LESS REDUNDANT.
0
No votes
3. SELF CONTAINED SOFTWARE WOULD BE BETTER.
0
No votes
 
Total votes : 0

PICOLOG ALARMS DRIVE FAST ARDUINO ACTION

Postby Glovisol » Wed Dec 28, 2016 8:10 pm

ALTERNATIVE COLOUR DETECTOR SOFTWARE DRIVES ARDUINO THRU SERIAL MONITOR

ALMSCRN.5 (Medium).jpg
PC screen showing all software involved - extra monitor ideal


This Picolog Alarm / Detect system is based, as the previous one, on the Colour Change Detector and on the Auto Mouse Clicker (AMC). But, whereas previously, depending on the detected alarm colour, the clicker loaded two different sketches onto Arduino, one for switching Pin 13 ON and the other for switching Pin 13 OFF, now the clicker loads two different digits (2 or 3) on the Serial Monitor. The Arduino sketch is permanently loaded and in stand-by: when it receives a "2" from the Serial Monitor it turns Pin 13 ON and turns Pin 13 OFF when a "3" is received. This system is extremely fast because the Arduino's compiling and loading times are eliminated. Only the times for system set-up and for Arduino switching need to be considered.

This system is based on the "Auto Text" feature of the AMC which writes stored text either pressing a keyboard special character, such as F2, F3...etc., or by opening a clicker file which contains the stored text and other steps, as it will be shown in the next post. The stored text that the AMC writes on the Serial Monitor reduces to the single digits "2" or "3", which operate conditional statements on the Sketch.
Attachments
Serial Command ALM sketch.doc
Arduino Conditional Command sketch
(22.5 KiB) Downloaded 33 times
Auto3.mcs.jpg
PIN 13 OFF clicker command file
Auto2.mcs.jpg
PIN 13 ON clicker command file
Last edited by Glovisol on Fri Dec 30, 2016 9:52 am, edited 2 times in total.
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

Re: PICOLOG ALARMS DRIVE FAST ARDUINO ACTION

Postby Glovisol » Thu Dec 29, 2016 1:58 pm

ALTERNATIVE COLOUR DETECTOR SOFTWARE DRIVES ARDUINO THRU SERIAL MONITOR


Sketc AMC1 Analyis.jpg
Arduino sketch ALARM ON /OFF on Pin 13


System initial conditions are as follows.

- Picolog open with alarm lamp(s) visible on the desktop.
- Arduino open and loaded with sketch AMC1.ino.
- Serial Monitor open with cursor blinking in the input window.
- Colour Change Monitor (CCM) open on the desktop and “enable change detection” of line 1 (TURN-ON) enabled. In this condition “0 Detected Out of 1” will be visible in the “Detection Count” window.
- Auto Mouse Clicker (AMC) files Auto2.mcs and Auto3.mcs visible on the desktop.
- AMC open on the desktop on file Auto2.mcs with line 1 highlighted.

When the targeted Picolog Alarm turns ON (transition from GREEN to RED) the following takes place:

1. The Colour Change Monitor opens the Auto2.mcs file and activates the stored AMC sequence.
2. AMC writes “2” on the Serial Monitor window.
3. AMC clicks on the START button of the Serial Monitor.
4. Arduino starts , turns Pin 13 ON and writes on the Serial Monitor: “PIN 13 ON - SAMPLE PICO ALARM COMMAND 2”.
5. In the meantime AMC clicks on line 3 of the CCD and opens the CCD window.
6. AMC clicks on “enable change detection” to ensure that the CCD will be activated when the Picolog Alarm will go into the OFF Alarm condition.
7. AMC clicks on “OK” closing the CCD window.
8. AMC clicks on the input window of the Serial Monitor to ready it for the Alarm OFF sequence.
9. System is now in stand-by, waiting for the Picolog Alarm to go OFF.


When the targeted Picolog Alarm turns OFF (transition from RED to GREEN) the following takes place:

1. The Colour Change Monitor opens the Auto3.mcs file and activates the stored AMC sequence.
2. AMC writes “3” on the Serial Monitor window.
3. AMC clicks on the START button of the Serial Monitor.
4. Arduino starts , turns Pin 13 OFF and writes on the Serial Monitor: “PIN 13 OFF - SAMPLE PICO ALARM COMMAND 3”.
5. In the meantime AMC clicks on line 1 of the CCD and opens the CCD window.
6. AMC clicks on “enable change detection” to ensure that the CCD will be activated when the Picolog Alarm will turn ON again.
7. AMC clicks on “OK” closing the CCD window.
8. AMC clicks on the input window of the Serial Monitor to ready it for the Alarm ON sequence.
9. System is now in stand-by, waiting for the Picolog Alarm to go ON.

The above functional description is useful in building and testing the system and in preparing the Auto.mcs files.
Attachments
Software blocks 2 .jpg
System Blocks Diagram
Auto2.mcs.jpg
Auto Mouse Clicker File: ALARM ON
Auto3.mcs.jpg
Auto Mouse Clicker File: ALARM OFF
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy


Return to PicoLog

Who is online

Users browsing this forum: No registered users and 0 guests