kjcho Posted June 14, 2013 Share Posted June 14, 2013 Hi, I'm using 'system ethercat' command since this thread has been written. I want to write PPMAC variables but PPMAC variables can't be input system command, like this... p1=500 system ethercat -m0 -p0 -t int16 download 0x607D 0 p1 Of course, ecatsdo command works fine. But I couldn't fix sdo problem yet... so I must use system ethercat command. p1=500 p0=ecatsdo(0,0,$607D,1,p1,0) How can I PPMAC variables with system commands?? Please let me know Thanks. Link to comment Share on other sites More sharing options...
hbausley Posted June 20, 2013 Share Posted June 20, 2013 You cannot use pmac variables with the system command. The system command forwards a string to be operated on by the operating system. Hi, I'm using 'system ethercat' command since this thread has been written. I want to write PPMAC variables but PPMAC variables can't be input system command, like this... p1=500 system ethercat -m0 -p0 -t int16 download 0x607D 0 p1 Of course, ecatsdo command works fine. But I couldn't fix sdo problem yet... so I must use system ethercat command. p1=500 p0=ecatsdo(0,0,$607D,1,p1,0) How can I PPMAC variables with system commands?? Please let me know Thanks. Link to comment Share on other sites More sharing options...
sjlee5 Posted July 3, 2013 Share Posted July 3, 2013 Hi, kycho. You can use pmac variables with the system command. Did you try like this? p1=500 system"ethercat -m0 -p0 -t int16 download 0x607D 0 %d", p1 please check the code above. Link to comment Share on other sites More sharing options...
kjcho Posted July 3, 2013 Author Share Posted July 3, 2013 Hi, kycho. You can use pmac variables with the system command. Did you try like this? p1=500 system"ethercat -m0 -p0 -t int16 download 0x607D 0 %d", p1 please check the code above. Hi, sjlee. Thank you for answer, but it didn't work... system"ethercat -m0 -p0 -t int16 download 0x607D 0 %d", p1 sh: ethercat -m0 -p0 -t int16 download 0x607D 0 %d,: command not found Link to comment Share on other sites More sharing options...
sjlee5 Posted July 3, 2013 Share Posted July 3, 2013 If your command is correct, please test code below. if you want to use system command with argument in terminal (on-line command), as I know, you should use with cx or cpx command. p1=500 cx system"ethercat -m0 -p0 -t int16 download 0x607D 0 %d", p1 try it, and please check again. Link to comment Share on other sites More sharing options...
kjcho Posted July 3, 2013 Author Share Posted July 3, 2013 It works! Thank you!! If your command is correct, please test code below. if you want to use system command with argument in terminal (on-line command), as I know, you should use with cx or cpx command. p1=500 cx system"ethercat -m0 -p0 -t int16 download 0x607D 0 %d", p1 try it, and please check again. Link to comment Share on other sites More sharing options...
Recommended Posts