Sample example for control Galil motion controller Using Qt Programs
-
i m new to this topic can any ane help me to send or receive data from galilPCI controller to Qt program and Qt program to Gallil Controller
-
Hi
Maybe from here ?
http://www.galilmc.com/downloads/api
Download the SDK for your platform.
There should be samples for c++.
It seems not to have direct support for Qt but the c++
should work.The quick start seems good place to start ;)
http://www.galilmc.com/learn/api-examples -
i m new to this topic can any ane help me to send or receive data from galilPCI controller to Qt program and Qt program to Gallil Controller
@Vijay-Lamkane said in Sample example for control Galil motion controller Using Qt Programs:
galilPCI
See here: http://www.galilmc.com/downloads/api
You can use their gclib C library to access the controller. There are examples.
See here how to use shared libraries with QtCreator: http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html -
Hi
Maybe from here ?
http://www.galilmc.com/downloads/api
Download the SDK for your platform.
There should be samples for c++.
It seems not to have direct support for Qt but the c++
should work.The quick start seems good place to start ;)
http://www.galilmc.com/learn/api-examples@mrjj
thanks for yor kind reply , i already tried to this link for download and install gclib but url is not working .also i had gone through the getting url mannulay from their website and but it not works -
@Vijay-Lamkane said in Sample example for control Galil motion controller Using Qt Programs:
galilPCI
See here: http://www.galilmc.com/downloads/api
You can use their gclib C library to access the controller. There are examples.
See here how to use shared libraries with QtCreator: http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html@jsulm thanks
but i fail to downlod gclib library ,i used http://www.galilmc.com/sw/pub/all/doc/gclib/html/ubuntu.html
but the url is not working -
currently i am using Galil.h file
but stuck here
#include <QCoreApplication>
#include <Galil.h>int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);Galil g("192.168.1.100"); return a.exec();
}
gives errors like
error: undefined reference to `Galil::Galil(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'/home/system/Qt_Programs/galilConnection3/main.cpp:8: error: undefined reference to `Galil::~Galil()'
how can i solve it
-
currently i am using Galil.h file
but stuck here
#include <QCoreApplication>
#include <Galil.h>int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);Galil g("192.168.1.100"); return a.exec();
}
gives errors like
error: undefined reference to `Galil::Galil(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'/home/system/Qt_Programs/galilConnection3/main.cpp:8: error: undefined reference to `Galil::~Galil()'
how can i solve it
@Vijay-Lamkane The URL is working for me.
It is not enough to include the header file: you have to link against the library (*.so). -
@Vijay-Lamkane The URL is working for me.
It is not enough to include the header file: you have to link against the library (*.so)..pro file
QT += core
QT -= guiTARGET = galilConnection3
CONFIG += console
CONFIG -= app_bundleTEMPLATE = app
SOURCES += main.cpp
unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lGalil
INCLUDEPATH += $$PWD/../../../../usr/include
DEPENDPATH += $$PWD/../../../../usr/include:-1: error: skipping incompatible /home/system/Qt_Programs/galilConnection3/../../../../usr/lib//libGalil.so when searching for -lGalil
:-1: error: skipping incompatible /usr/lib/../lib/libGalil.so when searching for -lGalil
:-1: error: cannot find -lGalil -
.pro file
QT += core
QT -= guiTARGET = galilConnection3
CONFIG += console
CONFIG -= app_bundleTEMPLATE = app
SOURCES += main.cpp
unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lGalil
INCLUDEPATH += $$PWD/../../../../usr/include
DEPENDPATH += $$PWD/../../../../usr/include:-1: error: skipping incompatible /home/system/Qt_Programs/galilConnection3/../../../../usr/lib//libGalil.so when searching for -lGalil
:-1: error: skipping incompatible /usr/lib/../lib/libGalil.so when searching for -lGalil
:-1: error: cannot find -lGalil@Vijay-Lamkane Are you building for x86 or x86_64? Is the library built for x86 or x86_64? You can check calling
file /usr/lib/../lib/libGalil.so
on the command line.
Post here what file /usr/lib/../lib/libGalil.so prints. -
ile /usr/lib/../lib/libGalil.so
/usr/lib/../lib/libGalil.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=43f20bd8e5cbb6aff96819c8376887d030ac4f19, stripped
-
@Vijay-Lamkane Are you building for x86 or x86_64? Is the library built for x86 or x86_64? You can check calling
file /usr/lib/../lib/libGalil.so
on the command line.
Post here what file /usr/lib/../lib/libGalil.so prints.@jsulm
is there need of controller to be connected while testing the given program ? -
@jsulm
is there need of controller to be connected while testing the given program ?@Vijay-Lamkane For testing yes but not to build it. You're current problem isn't related to connected/not connected controller.
The lib is x86, so I guess you're building for x86_64, is that correct? In this case you should either build for x86 or check whether this library is available as x86_64.
-
@Vijay-Lamkane For testing yes but not to build it. You're current problem isn't related to connected/not connected controller.
The lib is x86, so I guess you're building for x86_64, is that correct? In this case you should either build for x86 or check whether this library is available as x86_64.
@jsulm
i had reinstalled lib file#include <QCoreApplication>
#include <Galil.h>#include <iostream> //cout
#include <sstream> //ostringstream istringstream
#include <vector>
#include <iostream>.h>
using namespace std;
int main(int argc, char *argv[])
{//string address = "";
Galil g();
Galil *q;cout << Galil::libraryVersion() << endl;
}
Output Error
/home/system/Qt_Programs/galilConnection3/main.cpp:17: error: undefined reference to `Galil::libraryVersionabi:cxx11'
-
Hi,
Looks like you are not linking to the library.
-
after building only galilConnection4.pro file
:-1: error: No rule to make target 'galilConnection4.o'. Stop.
-
What's in that .pro file ?
-
QT += core
QT -= guiTARGET = galilConnection3
CONFIG += console
CONFIG -= app_bundleTEMPLATE = app
SOURCES += main.cpp
unix:!macx: LIBS += -L$$PWD/../../../../usr/lib/ -lGalil
INCLUDEPATH += $$PWD/../../../../usr/include
DEPENDPATH += $$PWD/../../../../usr/include -
Where's galilConnection4.cpp ?