rol-jal-bim112 with automatic reference

Fragen und Diskussionen zur Entwicklung von neuen Geräten. Sowohl Hardware als auch Software. English is welcome.
Antworten
pete68
Beiträge: 57
Registriert: 14. Jun 2015, 10:12

rol-jal-bim112 with automatic reference

Beitrag von pete68 »

hi
many roller shutter actuators are equipped with an automatic reference which, in the event of a black-out, leads, in case of absolute positioning request, the shutter to position 0% (top) itself, thus obtaining a precise reference for subsequent positioning.

I worked a bit on the firmware "rol-jal-bim112" modifying the file "channel.cpp" in the routine "Channel::objectUpdate" and precisely in the point:

case COM_OBJ_SET_POSITION:
if (! (activeLocks & LOCK_ABSOLUTE_POSITION))
{
// inizio modifica **************************************************
//--aggiunta per riferimento in caso di blackout
if (!positionValid) // verifico se necessito di riferimento
{
position=value;
_savePosition (features & FEATURE_RESTORE_AFTER_REF);

// indipendentemente da dove si trova la tapparella
// voglio che vada su per il tempo massimo stabilito in ETS, per essere sicuro
// che dopo sia effettivamente tutta aperta
position=255; // ora l'attuatore pensa che la tapparella sia tutta chiusa

moveTo (0); // tutto su per il riferimento
}

if (positionValid) // solo se la posizione risulta valida, vado alla posizione richiesta

// fine modifica *********************************************************

moveTo(value); // vai alla posizione... %

}
break;

this change seems to work for the moment, but you must also change the routine that manages the scenes because even here there is a "moveTo" that must verify the validity of the position.
I try to add the same changes made previously but in the routine of scene manage :

void Channel::handleScene(unsigned int value)
{
bool save = value & 0x80;
value &= 0x3F;

for (unsigned int i = 0; i < NO_OF_SCENES; i++)
{
if (sceneNumber == value)
{
if (save)
{
if (features & FEATURE_STORE_SCENE)
{
if (_storeScene(i))
userEeprom.modified();
}
}
else //richiesta esecuzione di una scena

{
// inizio modifiche -----------------------------------------------------
if (!positionValid) // verifico se necessito di riferimento
{
position=value;
_savePosition (features & FEATURE_RESTORE_AFTER_REF);

position=255; // ora l'attuatore pensa che la tapparella i-esima sia tutta chiusa

moveTo (0); // tutto su per il riferimento
}

if (positionValid)
//fine modifiche ------------------------------------------

_moveToScene(i);
}
}
}
}

but in this case, when the position is not valid, the shutters go up (0%) validating the position but do not move to the position decided with the scene.

It seems that the call "_moveToScene (i)" is not executed!

I accept suggestions

thank you
pete68
Beiträge: 57
Registriert: 14. Jun 2015, 10:12

Re: rol-jal-bim112 with automatic reference

Beitrag von pete68 »

possible that even the firmware author can not answer me?
yet it is an important function to implement (for safety!) :?:
pete68
Beiträge: 57
Registriert: 14. Jun 2015, 10:12

Re: rol-jal-bim112 with automatic reference

Beitrag von pete68 »

all right, I answer myself ... this change seems to work for the scenes, at least for now.
The attached image shows the sequence of operations required by the actuator, CH1 and CH2 channels. With scene 1, i requested the actuator to place CH1 at 44% and CH2 at 25%.
At the Power-On the actuator does not know the position of the shutters, therefore for each of them positionValid = false, then executes the content of "if (! PositionValid)" bringing the shutters to the reference position 0% obtaining a valid position from which start to reach the desired position from the scene.

this the code.....

case COM_OBJ_SCENE: // object for scene
if (! (activeLocks & LOCK_SCENE))
{

if (!positionValid) // verifico la necessità di riferimento
{
savedPosition=scenePos[value]; // salvo le posizioni di arrivo stabilite nella
// scena per il successivo riferimento

position=255; // non conosco la posizione attuale, ma voglio pensare che
//sia tutto GIU

moveTo(0); // vai tutto SU
}

else
{
handleScene(value); // non c'è bisogno di riferimento, vai alla posizione... %
}

}
break;


any improvement proposal is welcome
Dateianhänge
scena JALO.png
scena JALO.png (39.32 KiB) 2606 mal betrachtet
Antworten