If its possible to start linux programs from >Zitat:
SysProcess.SysProcess.ExecuteCommand2
function?
Simple command like ```
sudo reboot
``` is working but when I try to use program >Zitat:
netcat
then nothing happen. Even when I create script with netcat command and I will run this script from codesys its not working. When I run this script from shell its working properly.
This is some codesys limitation or I am doing something wrong?
Somebody try to start any linux program from codesys?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
hm.. looks like a bug,
I see if I add the command to /etc/CODESYSControl_User.cfg:
[SysProcess]
Command.0=shutdown
Command.1=netcat
and start the runtime manually ( to have more debug info), we see that netcat is executed, anyway somehow the result is not delivered to the SysProcessCommand2 in the IEC code.
Seems a to be a bug.
Please add a bugreport with your application attached to the store -> my question -> bugreport
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can You try command >Zitat:
"echo message date +%s | nc -u -w 0 192.168.1.1 2000"
This should send UDP message "message date +%s" to 192.168.1.1 on port 2000.
In Your test program netcat was executed, but I cant send UDP message.
If somethisg is not clear feel free to ask.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In Your test program netcat was executed but the result was not delivered to the SysProcessCommand2 in the IEC code.
Can You test again program netcat to for example send some UDP packet, it will be for shure that it was executed properly or not.
When I try command ```
If its possible to start linux programs from >Zitat:
SysProcess.SysProcess.ExecuteCommand2
function?
Simple command like ```
sudo reboot
``` is working but when I try to use program >Zitat:
netcat
then nothing happen. Even when I create script with netcat command and I will run this script from codesys its not working. When I run this script from shell its working properly.
This is some codesys limitation or I am doing something wrong?
Somebody try to start any linux program from codesys?
Hi,
hm.. looks like a bug,
I see if I add the command to /etc/CODESYSControl_User.cfg:
[SysProcess]
Command.0=shutdown
Command.1=netcat
and start the runtime manually ( to have more debug info), we see that netcat is executed, anyway somehow the result is not delivered to the SysProcessCommand2 in the IEC code.
Seems a to be a bug.
Please add a bugreport with your application attached to the store -> my question -> bugreport
BR
Edwin
Thank you for your response.
How do you get this debug info?
Can You try command >Zitat:
"echo message
date +%s
| nc -u -w 0 192.168.1.1 2000"This should send UDP message "message
date +%s
" to 192.168.1.1 on port 2000.In Your test program netcat was executed, but I cant send UDP message.
If somethisg is not clear feel free to ask.
Hi,
not sure what exactly you want to archive but I would recommend to send or receive UDP frames
that way:
l viewtopic.php?t=6625#p13743 l
BR
Edwin
In Your test program netcat was executed but the result was not delivered to the SysProcessCommand2 in the IEC code.
Can You test again program netcat to for example send some UDP packet, it will be for shure that it was executed properly or not.
When I try command ```
"echo message
date +%s
| nc -u -w 0 192.168.1.1 2000"``` UDP packet is not sended, probably netcat with this parameter is not executed.
Can You explain how to run this debug mode from previous post?
In CODESYSControl_User.cfg I have:
[SysProcess]
Command=AllowAll
Hi,
I think it is not allowed to combine commands / echo + netcat
stop the service by:
sudo /etc/init.d/codesyscontrol stop
start it manually by
cd /var/opt/codesys
sudo /opt/codesys/bin/codesyscontrol_armv6l_raspberry.bin -d /etc/CODESYSControl.cfg
Once again I would recommend to do this UDP sending stuff by netbase services library like in the link in the upper post.
BR
Edwin