How would you design a real time application for cnc control in c / c++ ???

More
22 Aug 2021 00:12 #218364 by Grotius
linuxcnc/src/emc/task/taskmodule.cc
Line 361
.def_readwrite("dtg", &EMC_TRAJ_STAT::dtg )

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

More
22 Aug 2021 15:10 #218414 by udoS
Now ! Mr Grotius, ( thanks )

is there a way to figure this out by my self.
Is there a system behind it that I don't see.
.def_readwrite("dtg", &EMC_TRAJ_STAT::dtg )
means:   xAxisDTG = emcStatus->motion.traj.dtg.tran.x;
How do you know (or better me) that it is in:  "motion.traj.dtg.tran.x"
Because the next thing I'm looking for is the pos cmd for each axis and consequently the following error.

Best regards
 

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

More
23 Aug 2021 07:52 - 23 Aug 2021 07:58 #218467 by udoS
Hi Grotius, ( maybe also to bkt )

about that problem with the RCS_STAT_CHANNEL : SOLVED ( in a way)
You only need to open that Channel once in your main. 
 Every consequent use of emcStatus->  reads over that one channel. 

Best regards
Last edit: 23 Aug 2021 07:58 by udoS.
The following user(s) said Thank You: bkt, Grotius

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

More
23 Aug 2021 08:07 #218469 by udoS
Sorry Gentlemen,

I can find EMC_STAT_TYPE .. Parameter, Type: [a HUGE load of params]. ?
EMC_XXXXXX_STAT_TYPE .. Parameter, Type: [a HUGE load of params]. ?

Where and what are they. Can anyone help to get this nml-stuff going.

Best regards

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

More
23 Aug 2021 08:22 #218471 by Grotius
Hi Udo,

Do you have a github project page for your project?
To look with you, i need to load a project wich has the -lnml include flags etc.
And then your wish list is to document and interface everything inside the emc status/traject channel?

 

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

More
23 Aug 2021 10:34 - 23 Aug 2021 13:36 #218483 by udoS
Hi Grotius

I will look at how to set up a git. 
I'm using qtcreator 4.8 with Qt Vers. 5.12.10 on a linux 4.19.0-17-rt-amd PREEMPT RT 2021-07-08

github.com/cnc-nexT/Qt-Lcnc ( allah damnit   ) took me a while.
 
Last edit: 23 Aug 2021 13:36 by udoS.

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

More
23 Aug 2021 12:24 #218501 by Grotius
Hi,

Oke, If you have any questions about github, just ask.

We as c++ guru's have to be a structurized party.
Therefore my preference's are to install linuxcnc in the following dir : /opt/linuxcnc

In this way, we are alway's lined up with each other related to "qt project include paths".




 

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

More
23 Aug 2021 13:41 - 23 Aug 2021 13:42 #218506 by udoS
OK in this case :
I install a fresh RTOS; Yes? Is there a linuxcnc-dev?
sorry but no EtherCAT just now. I need the port for the plc-ethercat.

don't expect to much from the git. VEERY dirty. Just start to make it work.
Last edit: 23 Aug 2021 13:42 by udoS.

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

More
23 Aug 2021 14:15 - 23 Aug 2021 14:18 #218516 by Grotius
Ahh,

Then just install the linux-pro at sourceforge. This has everything you need. Also lcnc-dev, ethercat bus etc.
Dont forget to hit the online-installer.

If you preferr to work without git. Then just upload the /project-dir over here as .tar.gz archive.
For me it doen't matter. But if you want to have contributors to your code. Git is the way.

 
Last edit: 23 Aug 2021 14:18 by Grotius.

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

More
23 Aug 2021 14:18 - 23 Aug 2021 14:23 #218518 by udoS
Now Mr Grotius let me explain....
If you have a look at the short YouTube you will see
Linuxcnc
Vismach
Gremlin
and on the win10 the IDE from LogicLab's axel-plc that's online with the plc running on the Linux PC with EtherCAT Master connected to 5 axis Puls/train Board slave. The config is a standard ESI File.
For that plc I build a PlugIn that IPC_CREATE's a named Shem with semaphore to connect to the HAL. In the HAL nothing is connected except 4 axis cmd and 4 axis fb. PLC running at 1ms main task  connecting the linuxcnc Values with the EtherCAT slave. 
Whats commented in the Qt main window is the communication with the plc updating at 50ms.
github.com/cnc-nexT/Qt-Lcnc
Now the coolest thing would be to use the PlugIn for the nml communication and the Qt also talking to the plc. BINGO.
Maybe no need for the HAL at all. That'll be the day.
Last edit: 23 Aug 2021 14:23 by udoS.
The following user(s) said Thank You: Grotius

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

Time to create page: 0.105 seconds
Powered by Kunena Forum