www.selfbus.org
https://selfbus.forums3.com/

rol-jal-bim112 with automatic reference
https://selfbus.forums3.com/viewtopic.php?f=6&t=494
Page 1 of 1

Author: pete68 [ 24. Dec 2018 15:52 ]
Post subject: rol-jal-bim112 with automatic reference

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 [i] == 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

Author: pete68 [ 29. Dec 2018 09:59 ]
Post subject: Re: rol-jal-bim112 with automatic reference

possible that even the firmware author can not answer me?
yet it is an important function to implement (for safety!) :?:

Author: pete68 [ 30. Dec 2018 10:16 ]
Post subject: Re: rol-jal-bim112 with automatic reference

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

Attachments:
scena JALO.png
scena JALO.png [ 39.32 KiB | Viewed 202 times ]

Page 1 of 1All times are UTC + 1 hour
phpBB Forum Software