Test and Measurement Forum

2016 CHRISTMAS SPECIAL: SOFTWARE FOR HARD WIRED ALARMS

Forum for discussing PicoLog

2016 CHRISTMAS SPECIAL: SOFTWARE FOR HARD WIRED ALARMS

Postby Glovisol » Mon Dec 19, 2016 4:44 pm

MULTIPLE UNIVERSAL ALARM ACTUATOR SOFTWARE WITH PHYSICAL HARD WIRED OUTPUTS

ALMSCRN1.jpg
PC SCreen showing ALARM DETECTION principle


A major limitation of Picotech Data Loggers driven by Picolog is (A) the very limited number of hard wired outputs (for instance only 2 on the 1012 and 4 on the DrDAQ, to name a few) and (B) the absence of hard wired outputs for the calculated channels.

With the proposed software we can now have as many hard wired alarm outputs (both from physical channels and from calculated channels) as the existing channel alarms on the DA device. Furthermore the available outputs can drive any external USB device, from simple USB relay banks to top capability Microprocessors like Arduino.

In fact illustrated examples covering the actuation of an Arduino Micro (with arduino software load as well) will be demonstrated.

The alarm detection principle is quite simple: off the shelf, free to use software monitors the colour of the alarm indicator and detects the transition from green to red (but other colours can be used, as optionally available in Picolog).

The Colour detector (costing £ 6) then drives very accurate mouse-click software (costing £ 5) which can implement simple or complex operations, depending on the external USB devices we need to employ.

The complete set-up will be described in future posts. An animation is available, but unfortunately it cannot be uploaded here because of its 2 MB size.
Attachments
ALMSCRN2.jpg
PC SCreen showing ALARM DETECTOR window
Last edited by Glovisol on Sun Dec 25, 2016 3:03 pm, edited 3 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: 2016 CHRISTMAS SPECIAL: SOFTWARE FOR HARD WIRED ALARMS

Postby Glovisol » Tue Dec 20, 2016 10:36 pm

MULTIPLE UNIVERSAL ALARM ACTUATOR SOFTWARE WITH PHYSICAL HARD WIRED OUTPUTS

ALMSCRN3.jpg
PC screen showing desktop layout


SIMPLE STEPS TO GET THE PC DESKTOP READY FOR OPERATION


In the previous post we have seen how the Picolog Alarm condition is detected. The PC screen above shows how the PC desktop must look: in a word it must be CLEAN and UNCLUTTERED, because the detected alarm opens a file which holds recorded mouse clicks. This system works only if the spots to be clicked are exactly in the same place as in recording and if they are visible on the desktop. For this reasons the maiority of the application icons of the desktop have been stored in a folder and only a few application icons are visible.

In this example, after a calculated channel alarm, the system does (very easily and simply) the following complex operations:

- Opens the "Blink" Arduino sketch.
- Loads the sketch to Arduino.
- Once uploaded, Arduino starts blinking.
- After a preset time (10" approx.) the sketch windows are closed and the desktop is clear.
- Now opens the "Bare minimum" Arduino sketch.
- Loads the sketch to Arduino.
- Once uploaded, Arduino stops blinking.
- Now closes the sketch windows.
- Opens the Alarm Detector window.
- Re-sets the Alarm Detector to be ready for a future alarm condition.
- Closes the Alarm Detector window.
- Shows a message box telling what alarm has been activated.


Driving a multiple relay USB board would be much simpler. In the next post a step by step example with software layout and connections will be discussed.
Last edited by Glovisol on Sun Dec 25, 2016 3:06 pm, edited 1 time in total.
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

Re: 2016 CHRISTMAS SPECIAL: SOFTWARE FOR HARD WIRED ALARMS

Postby Glovisol » Thu Dec 22, 2016 4:35 pm

MULTIPLE UNIVERSAL ALARM ACTUATOR SOFTWARE WITH PHYSICAL HARD WIRED OUTPUTS


ALMTST layout.JPG
This is the test layout: just the DrDAQ, temp. probe and the Arduino, no additional hardware necessary


The required software for this project is available here:

http://www.auto-clicker.com/2011/09/col ... -detector/

https://murgee.com/auto-mouse-click/

Comprehensive instructions are given in the respective sites.

In this post the entire step by step example sequence will be described. In the next post the step by step procedure to build up the facility will be given.

With reference to the blocks diagram, the Picolog software drives the external Data Logger via the USB bus. Picolog displays measured & recorded data, as well as showing the GREEN/RED alarm lamps. The Alarm Colour Detector application open on the PC desktop, monitors the alarm lamp and opens the corresponding clicker file, which stores a previously recorded click sequence. The clicker file drives the Mouse Clicker application, which actuates a sequence for the Actuator Software. The Actuator Software, via the USB bus, drives an external relay board or microprocessor.

In this post we examine a detailed example where a “RAW pH” alarm actuates output pin #13 of an Arduino 1 Microprocessor board: when the alarm condition is detected, pin #13 goes to HIGH level, when the alarm condition ceases, pin #13 reverts to the LOW state.

The entire process is detailed in the PC screen of FIGURE 1 (all process files will be uploaded in the next post) and works as follows.
1. The Alarm Colour Detector (ACD) window (lower right) in A senses the Raw pH lamp of Picolog (upper right).
2. When the colour changes from GREEN to RED the ACD turns the PH_ALM_ON file on. This file drives the clicks sequence of the Auto Mouse Clicker (AMC).
3. The AMC opens the SWITCH.13_ON Arduino Sketch and at the end of the sketch the Arduino Pin #13 goes HIGH.
4. Arduino now remains with Pin #13 ON and the AMC is in stand-by.
5. When the Picolog alarm status ceases, the Raw pH lamp goes from RED to GREEN.
6. This change is detected by the ACD in C, which turns the PH_ALM_OFF file on. This file drives another clicks sequence of the AMC.
7. The AMC opens the SWITCH.13_OFF Arduino Sketch and at the end of the sketch the Arduino #13 Pin goes LOW, while a message box appears on the desktop: “Alarm OFF - Remember to set ON alarm for new cycle”.
Attachments
Software blocks.jpg
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

Re: 2016 CHRISTMAS SPECIAL: SOFTWARE FOR HARD WIRED ALARMS

Postby Glovisol » Sun Dec 25, 2016 4:18 pm

MULTIPLE UNIVERSAL ALARM ACTUATOR SOFTWARE WITH PHYSICAL HARD WIRED OUTPUTS

Here is the FIGURE 1 which the system did not allow me to upload in the previous post, plus all the text files. Unfortuntely Arduino Files and AMC files have extensions which are not acceptable by the Picotech site, therefore I have copied them into WORD. However all these files are elementary and can be written in their software in a matter of minutes.
Attachments
ALARM TEXT FILES.doc
(24 KiB) Downloaded 40 times
SKETCHES TEXT FILES.doc
(22.5 KiB) Downloaded 34 times
SYSTEM DESKTOP.jpg
FIGURE 1
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

Re: 2016 CHRISTMAS SPECIAL: SOFTWARE FOR HARD WIRED ALARMS

Postby Glovisol » Mon Dec 26, 2016 8:20 am

MULTIPLE UNIVERSAL ALARM ACTUATOR SOFTWARE WITH PHYSICAL HARD WIRED OUTPUTS

The following rules must be followed to implement the build procedure.

1. The click locations must be firmly fixed on the desktop screen. This result can be obtained as follows.
- Right click on an empty spot on the desktop – go to ASPECT– select ICONS ON GRID and deselect AUTOMATIC ICON PLACEMENT.
- An ideal situation (even if not indispensable) can be implemented by using a second monitor. With a dual monitor system the project can be implemented on the second monitor and the original desktop needs not be changed.
- Set the folders to cover the entire PC screen when open: this ensures a fixed position for the applications they contain, as well as a fixed position for the “close” x button on the far top right.
- Place all system icons and application windows (Picolog and Color Change Detector) as shown in FIGURE 1.

2. At first the system will appear not working and or unreliable: this happens because there are many steps to implement and it is easy to do an omission, a mistake or to click on the wrong spot.
3. Another important point regards the application timing. The times that will be recorded by the Mouse Click Recorder will be those obtained at the time of recording. This is OK for quick actions, like opening or closing a window, but can be a problem when applications are involved, because the time required by an application is not fixed, but depends on the CPU load at the time. Suppose you do the recording with the PC just opened and fast: the Arduino sketch will load and turn on Pin #13 in as little as 7,000 mS (7”). But later on, with the CPU loaded by other applications, the sketch will take up to 18,000 mS. If the time allowed for this operation is too short, the clicker will close the application before it has completed its job, the required operation will not be done and the system will appear unreliable. Luckily, once the Mouse Click Recorder has stored the sequence, one can open the Recorder file with the Auto Mouse Clicker and modify the timings to achieve faultless operation. For instance the Arduino sketches shown require a minimum of 16,000 mS to work reliably.
4. Finally remember that any desktop variation, e.g. opening other files and/or applications may affect the physical positions of parts of our system. If the system has to be used permanently it is advisable to use a dedicaded low cost PC, such as an used IBM X61. In fact this entire system was developed and works faultlessly on such a PC.


Implementation procedure is as follows:

1. Make sure all operating software is loaded: Picolog, Arduino, Color Change Detector (CCD) and [/b] Auto Mouse Clicker[/b] (AMC). Carefully study the detailed operating instructions of the CCD and AMC provided by the Vendor.
2. Begin by preparing the final actuator software: the Arduino sketches or any other external device such as USB relay board. Place the relevant icons or folders on the desktop and repeatedly make sure they work by clicking on their respective actuator spots.
3. Using the Mouse Click Recorder, build the click files. My example is detailed in the enclosed click files: PH_ALM_ON SCREEN and PH_ALM_OFF SCREEN.
4. Test the click files many times: in my example manually mouse clicking on the PH_ALM_ON will reproduce the sequence which eventually will turn the Arduino #13 output HIGH and the reverse for the PH_ALM_OFF.
5. Now open Picolog and set up the required alarm.
6. Open up the Color Change Detector and capture the alarm colours.
7. You are now ready to test the entire alarm actuation system.
Attachments
PH_ALM_ON SCREEN.jpg
Last edited by Glovisol on Wed Jan 04, 2017 3:33 pm, edited 1 time in total.
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

Re: 2016 CHRISTMAS SPECIAL: SOFTWARE FOR HARD WIRED ALARMS

Postby Glovisol » Mon Dec 26, 2016 8:42 am

MULTIPLE UNIVERSAL ALARM ACTUATOR SOFTWARE WITH PHYSICAL HARD WIRED OUTPUTS

THE SITE PROTECTION SYSTEM HAS GONE COMPLETELY HAYWIRE AND DOES NOT ALLOW POST EDITING ANY MORE AND NOBODY SEEMS TO CARE

Please amend final part of previous post as follows:

8. Remember that to start the entire system the "enable this change detection" box visible when clicking on line A (FIGURE 1) of the CCD must be selected (see PC screen below).
9. The same box for line C is automatically selected by the system.
10. You are now ready to test the entire alarm actuation system.

I am also adding the missing PH_ALM_OFF_SCREEN, also refused by the system.....
Attachments
ALMSCRN2.jpg
PH_ALM_OFF SCREEN.jpg
Glovisol
Advanced User
Advanced User
 
Posts: 114
Joined: Sat May 11, 2013 10:03 am
Location: San Marzano Oliveto, Asti, Italy

Re: 2016 CHRISTMAS SPECIAL: SOFTWARE FOR HARD WIRED ALARMS

Postby Glovisol » Tue Dec 27, 2016 8:45 am

MULTIPLE UNIVERSAL ALARM ACTUATOR SOFTWARE WITH PHYSICAL HARD WIRED OUTPUTS

ALMSCRN4.jpg



The proposed example, which illustrates Arduino actuation by a Picolog alarm, has big potential as the Micro, once started, can proceed with complex software of its own. The drawback is that this system is slow, because Arduino must be opened, the sketch compiled, loaded and then the Micro starts working: we are realistically loking at about 30".

If only simple ON / OFF external relay actuation is required, such as that offered here:

http://www.pc-control.co.uk/control/pro ... ontext.php

then the actuation can be much faster. The board's software must be set to "manual" mode and the AMC will click the desktop push buttons.

It is of course possible to close several relays in parallel with one alarm, or to build several parallel clicker files, each one actuated by one alarm, and each clicking independently on its own desktop pushbutton.

One such application will be illustrated february next.
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