Hi EBo,

it works partly with the second last patch!
The remote gui and logger works between 32bit-lcnc and 64bit-gui/logger.
But sending commands from the 64bit-gui to 32bit-lcnc doesn't work.
    libnml/nml/nml.cc 1326: NML: New data recieved but type of 0 is invalid.

Between 32bit (both 2.5.4) machines sending commands works. (additionally I've 
made tests with a raspi(server and real mill) and it works, too)

The 32bit-lcnc (server) is a unpatched 2.5.4 and the 64bit-lcnc (client) is a 
patched devel master head branch.
The 2.5.4 part is a real mill with rtai.
 
Attached are the testfiles.
In the nml-file change the ip for your lcnc-"server".
The build-script has to be invoked in the rip-env.
For a remote gui just include the nml-file in your ini and invoke it ie.:
     tklinuxcnc.tcl -ini your.ini

With and without headless. (DISPLAY = dummy) ;)

BTW: in cms_cfg.cc is a typo in log messages.
In line 881 and 887: TPCMEM should be TCPMEM.
Not realy important just for the sake of completeness.


matsche

PS: the combination 64bit(server) and 32bit(client) has not been tested.


-- 
"In der Wissenschaft siegt nie eine neue Theorie,
nur ihre Gegner sterben nach und nach"

Max Planck

Attachment: build_nml_logger.sh
Description: application/shellscript

/* compiling with
g++ -o nml-position-logger nml-position-logger.cc -I $EMC2_HOME/include -L $EMC2_HOME/lib -lnml -llinuxcnc
*/

#include "emc.hh"
#include "emc_nml.hh"
#include <unistd.h>
#include <iostream>
#include <cstdlib>

int main(int argc, char **argv) {
    if(argc < 2) { std::cerr << "Usage: " << argv[0] << " NMLFILE\n"; abort(); }
    const char *nmlfile = argv[1];
    RCS_STAT_CHANNEL *stat = new RCS_STAT_CHANNEL(emcFormat, "emcStatus", "xemc", nmlfile);
	  //RCS_STAT_CHANNEL *stat = new RCS_STAT_CHANNEL(emcFormat, "emcStatus", "emcsvr", nmlfile);
	//NML *error = new NML(emcFormat, "emcError", "emcsvr", nmlfile);
    while(1) {
        usleep(100*1000);
        if(!stat->valid()) continue;
        if(stat->peek() != EMC_STAT_TYPE) continue;
        EMC_STAT *emcStatus = static_cast<EMC_STAT*>(stat->get_address());
        std::cout << emcStatus->motion.traj.position.tran.x << " "
            << emcStatus->motion.traj.position.tran.y << " "
            << emcStatus->motion.traj.position.tran.z << "\n";
    }
    return 0;
}
#
# Use this NML config on the computer running the GUI in a networked emc2
# system. The host IP address should be changed to point to the computer
# that is running the realtime code. Change the NML_FILE in emc.ini to
# client.nml and (after the server side is running) run the GUI with:
#
#        tcl/tkemc.tcl -ini emc.ini
#
# Note: tkemc.tcl does not need to be run as 'root'.

# Buffers
# Name                  Type    Host             size    neut?   (old)   
buffer# MP ---

# Top-level buffers to EMC
B emcCommand            SHMEM   192.168.1.227       8192    0       0       1   
    16 1001 TCP=5005 xdr
B emcStatus             SHMEM   192.168.1.227       16384   0       0       2   
    16 1002 TCP=5005 xdr
B emcError              SHMEM   192.168.1.227       8192    0       0       3   
    16 1003 TCP=5005 xdr queue

# Processes
# Name          Buffer          Type    Host              Ops     server? 
timeout master? cnum

P emc           emcCommand      REMOTE   192.168.1.227           RW      0      
 1.0     0       0
P emc           emcStatus       REMOTE   192.168.1.227           W       0      
 1.0     0       0
P emc           emcError        REMOTE   192.168.1.227           W       0      
 1.0     0       0
P emc           toolCmd         REMOTE   192.168.1.227           W       0      
 1.0     0       0
P emc           toolSts         REMOTE   192.168.1.227           R       0      
 1.0     0       0



P xemc          emcCommand      REMOTE   192.168.1.227       W       0       
10.0    0       10
P xemc          emcStatus       REMOTE   192.168.1.227      R       0       
10.0    0       10
P xemc          emcError        REMOTE   192.168.1.227      R       0       
10.0    0       10
P xemc          toolCmd         REMOTE   192.168.1.227       W       0       
10.0    0       10
P xemc          toolSts         REMOTE   192.168.1.227       R       0       
10.0    0       10
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to