HAPCAN Programator

HAPCAN installation tips and troubleshooting when assembling, commissioning and configuring devices.
Rozwiązywanie problemów z instalacją HAPCAN, budową, uruchamianiem i konfiguracją urządzeń.
Jacek
Posts: 559
Joined: 17 Feb 2007, 18:00

Re: HAPCAN Programator

Post by Jacek »

symplex wrote: Prośba do Jacka:
Napisałem to już na początku tej dyskusji i z tym się zgodziłeś.
Jacku, rozważ zapisywanie w Programatorze konfiguracji modułów już raz odczytanych. Aby ponowna zmiana parametrów nie wymagała ponownego odczytu! Czeka mnie konfiguracja dużej instalacji - jak widzisz 50 modułów. Z moich szacunków wynika, że spędzę na tym tydzień od rana do wieczora, aby wszystko działało mniej więcej OK (z powodu konieczności odczytu tej konfiguracji), a później od czasu do czasu po godzince dziennie.
Jestem też programistą i wiem, że nigdy nie mamy czasu i Ty też o tym wiesz, ale nie skazuj mnie na taką mękę.
Wiesz jak to zrobić, więc proszę - znajdź trochę czasu. To nie tylko dla mnie, ale wszystkich korzystających z naszego fajnego Hapcana.
W tej chwili pracuję nad szybszym odczytem pamięci. Moduł po restarcie sprawdzi własną pamięć i zanotuje ostatnią używaną komórkę. W ten sposób nie będzie konieczne odczytanie całej pamięci modułu, a tylko do ostatniej zajętej komórki.
Bieżące zapisywanie pamięci modułów w HAPCAN Programatorze musi jeszcze poczekać, sorry.
Regards
Jacek
asicdruide
Posts: 13
Joined: 30 Jun 2014, 09:44
Location: Germany

Re: HAPCAN Programator

Post by asicdruide »

Hello symplex,

impressive network. I fully understand your concern how to configure/maintain a network of that size with a reasonable effort.
The solution i found for me is to change the perspective. Instead of regarding the aggregation of memory images of all nodes as "the network configuration" i'm describing the intended network behaviour using a highlevel DSL (domain specific language) which can be translated into memory images for each node. By this, the behavioural description is the master and the flash content becomes a derived object. To switch between completely different setups just flash memory images derived from a different highlevel description into the node(s) (just the needed words without any read-before).
The DSL will handle many details for you like enabling just those events in a button module which are used somewhere else to toggle an actor.
Another example, assume you have a complex box-setup with groups enabled/disabled by events. You wish to insert another box in between a group. You have to shift down all following boxes and to update the box-enable-disable rules. Using the gui a lot of stupid and error prone work. Using the scripted approach: copy-paste a line and flash the affected module(s). In total less than a minute.
In addition your network behaviour is fully documented in a human readable (,printable and editable) form.
Also disaster recovery is quite easy. Due to a lightning event you have to replace all your nodes. You buy/build a set of new nodes, update the node IDs (either in your description or in your nodes) and flash the full network in one shot.
Or you might want to extend the nodes firmware by adding your own commands. In the DSL it's easy to register additional methods to support that.
Your additions become an integral part of the hapcan network, indistinguishable from the original functionality.
Even after firmware upgrades the highlevel description stays valid, new functionality gets reasonable defaults, backward compatible functionality (even if mapped to different command codes/memory addresses) don't need to be touched.
As the highlevel description is ASCII text (source code) it can be easily diff'ed and version controlled (svn, git,...).

Long story in short, for me the only way to handle setups larger than a few nodes.

I've developed the DSL-tool till the point i needed it for my test purposes, it's neither complete nor finished.
It's on github: https://github.com/asicdruide/hapconf
It's written in PERL, a scripting language. It's easy to extend if you're a little familiar with programming. It runs under Linux and windows the same way (in principle). I've not tested this (but many comparable others) on windows. It even runs on a raspberry pi.

Best regards,

Klaus

I hope english is ok because i don't speak polish.
symplex
Posts: 13
Joined: 07 Apr 2014, 19:17
Location: Warsaw

Re: HAPCAN Programator

Post by symplex »

Dziękuję Jacku za wersję 3.34 Programatora i nowy firmware dla bistabilnych.
Przetestowałem u siebie ustawianie sieci.
Teraz konfiguracja przekaźników to inna bajka!
Bartek
Posts: 326
Joined: 14 Jul 2011, 19:36
Location: Wrocław
Contact:

Re: HAPCAN Programator

Post by Bartek »

Wgrałem nowy soft... a tu światła w całej oHapcanowanej części mieszkania mi się powłączały :). No dobra, jeden klik pilotem. Potem znów przy odczytywaniu przekaźników. Dopiero przedlądając zakładki przypomniałem sobie, że poprzedni update, którego nie miałem, dodawał polaryzację przekaźników ;).

Sam odczyt faktycznie szybszy, ale na moje oko to okienko odczytu/zapisu mogło by samo znikać po zakończeniu transmisji (może pstryczek "zamknij okno po zakończeniu").
Dzięki.
Jacek
Posts: 559
Joined: 17 Feb 2007, 18:00

Re: HAPCAN Programator

Post by Jacek »

Dzięki Panowie za feedback.
Symplex, w nowym firmware do interfejsu ethernetowego wykorzystany został cały wolny ram do powiększenia buforu FIFO. Sprawdź proszę jak się zachowuje u Ciebie - powinien odczytywać wszystkie moduły w jednej grupie. UNIV 3.102.0.1-rev2 (http://hapcan.com/devices_pl/universal/ ... /index.htm)
Regards
Jacek
symplex
Posts: 13
Joined: 07 Apr 2014, 19:17
Location: Warsaw

Re: HAPCAN Programator

Post by symplex »

Dzięki za modyfikację.
Chętnie bym sprawdził, ale musiałem wymienić komunikację Ethernet na RS232. Moduł ethernetowy padł bez powodu. Widać go od strony strony CAN, ale od strony LAN niestety nie. Obie diody na module mrugają - wydaje mi się z większą częstotliwością niż zwykle. Z tego powodu, że muszę przystąpić do konfiguracji na razie będę to robił na RS-ie, ale LAN pewnie nadaje się do wymiany.
Jacek
Posts: 559
Joined: 17 Feb 2007, 18:00

Re: HAPCAN Programator

Post by Jacek »

Szybkie naprzemienne miganie diod może oznaczać problem z firmware w Tibbo.

(http://docs.tibbo.com/phm/appendix_1.htm) "TiOS firmware not loaded or corrupted".

Prawdopodobnie nie widzisz modułu w Tibbo Device Explorer-ze. Zrestartuj (odłącz zasilanie) moduł ze zwartym jumper-em JP1. Po tej czynności powinien pojawić się w Device Explorer-ze i możliwe będzie załadowanie firmware.

(http://docs.tibbo.com/phm/appendix_2.htm) "When the device is powered up (exits from the hardware reset) with the button pressed (line pulled low), it enters a firmware upgrade mode in which new TiOS firmware, possibly with compiled Tibbo BASIC application attached, can be uploaded into the device."
Regards
Jacek
symplex
Posts: 13
Joined: 07 Apr 2014, 19:17
Location: Warsaw

Re: HAPCAN Programator

Post by symplex »

Wgrałem nowy firmware UNIV oraz firmware Tibbo.
Faktycznie, wgranie nowego softu do pomogło modułowi - zmarwychwstał!
Jednak Programator dalej widzi tylko 49 modułów w grupie.
Jacku, może masz w programie po prostu tablicę na max 50 modułów i nic nie da zwiększenie FIFO?
Jacek
Posts: 559
Joined: 17 Feb 2007, 18:00

Re: HAPCAN Programator

Post by Jacek »

Rozmiar tablicy w HAPCAN Programatorze jest ustawiany dynamicznie. Może tu chodzi o czas "poświęcony" na odczyt. Spróbowałeś zwiększyć czas odpowiedzi w ustawieniach?
Wykonałem testy, co prawda, nie z fizycznymi modułami, ale z symulacją 256 modułów z czasem odpowiedzi 400ms.
a.png
Na pewno masz wgrany firmware UNIV 3.102.0.1-rev2 (http://hapcan.com/devices/universal/uni ... 1-rev2.zip)?
Regards
Jacek
symplex
Posts: 13
Joined: 07 Apr 2014, 19:17
Location: Warsaw

Re: HAPCAN Programator

Post by symplex »

Faktycznie, po zmianie na 200ms odczytują się wszystkie 51 modułów. Przy 100ms - różnie: raz 50, czasami wszystkie 51. Szkoda tylko, że wynikiem tego jest odczuwalnie dłuższe przeszukiwanie sieci.
Post Reply