for QT and c ++ lovers -tutorial- (...sort off...)

More
25 Jan 2022 19:44 #233093 by bkt
Here we are now at the crucial point .... so far I have shown you the steps that everyone more or less go through to get to the solution we are looking for ..... and here we finally realize that the best place to search answers is still the Lcnc code .... unfortunately, patience and a job of building the puzzle are required .... also because if it is true that since 2019 someone has tried to create a map of the classes and the Lcnc headers .... it is true that understanding everything on the fly is not trivial but above all the master code is constantly updated .... the files that are important for sharing SHEMEM, however, always remain hal.he hal_lib.c which shows its implementation .... I am attaching both for easy reading .... having read the previous notes theoretically, you won't have much trouble understanding these files and understanding that this is the crux of the matter .... now it's time to create a nice writing implementation projects and the ttura .... I already notice that I will be lazy and will not implement a Qthread to do the example readings .... however I am attaching some interesting code .... in the next post ... see you later

 

File Attachment:

File Name: hal.h
File Size:41 KB

File Attachment:

File Name: hal_lib.c
File Size:122 KB
Attachments:
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
28 Mar 2022 17:34 - 28 Mar 2022 18:08 #238534 by udoS
Hi
may be this would be interesting for you.
Shared mem into HAL with Pins reversed IN <==> OUT.
 
Attachments:
Last edit: 28 Mar 2022 18:08 by udoS.
The following user(s) said Thank You: bkt, Grotius

Please Log in or Create an account to join the conversation.

More
01 Apr 2022 12:22 - 02 Apr 2022 08:05 #238984 by bkt
sorry at all but is a real full time for me .... udoS post an interest implement at grotius way .... pheraps after 1 month of test I discover that using hal.h and hal_lib.c give some problem (rarely) with semaphore .... so gui can crash if QT side is not implement a sort of semaphore ....so I work on it. See you later ....
Last edit: 02 Apr 2022 08:05 by bkt.

Please Log in or Create an account to join the conversation.

More
02 Nov 2023 22:29 #284384 by bkt
REALLY LAST IMPORTANT THINGS FOR NO WASTE TIME .... obvius but if long time not operate on these can be forgot:

hal_priv.h  from your installation need to be copyed into your c++project folder (rt-preempt) .... but need to be the same of your install .....

I loose 4 day because upgrade lcnc and forgot copy hal_priv.h in mine project folder .... result od these error, all go but no one pin was redable from my app .... (all other, as ethercat, ethernet/IP it work perfect ..... if outside Lcnc).

regards
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum