Hi,
how can i create a DMC command in C++ with the GCStringIn Variable? I´m using a 2 axis system with gclib andDMC41x3 Controller..
I tried the following:
GCStringIn command; //DMC command string
int x, y;
std::stringstream sstr;
x = 100000
y = 100000
sstr <<"PA "<<x<<","<<y;
command = sstr.str().c_str();
GCmd(galil_1, command);
Unfortunatly this is not working for large x,y values, the stream gives me confusing numbers like "424??873"..
Any Idea how to solve this problem?, thank you very much
troym_galil on 10/13/2016 - 08:21
Have you tried using sprintf() function?
https://www.tutorialspoint.com/c_standard_library/c_function_sprintf.htm