This commit is contained in:
gac-S_Changer
2017-02-24 15:52:50 +01:00
parent b40a3ebd38
commit ef893dc9cc
7 changed files with 29 additions and 21 deletions

View File

@@ -124,5 +124,8 @@
<Value key="0" fatherId="world[0]" />
</Data>
<Data name="t" access="private" xsi:type="array" type="trsf" size="1" />
<Data name="f" access="private" xsi:type="array" type="frame" size="1">
<Value key="0" fatherId="world[0]" />
</Data>
</Datas>
</Database>

View File

@@ -93,7 +93,7 @@
ex = "The variable does not exists"
break
case -2
ex = "The variable library does not exists"
ex = "The variable library does not exist"
break
case -3
ex = "The index is out of range"
@@ -130,7 +130,7 @@
return
break
case -2
ex = "The variable library does not exists"
ex = "The variable library does not exist"
return
break
case -3
@@ -147,10 +147,10 @@
endSwitch
endFor
break
case "get_str"
$exec("s = " + args[0])
tx = s
break
//case "get_str"
// //$exec("s = " + args[0]) TODO: MAKES THE CONTROLLER TO CRASH!
// //tx = s
//break
case "get_pnt"
$exec("p = " + args[0])
$exec("t = " + args[0])

View File

@@ -19,7 +19,8 @@
case "mount"
toNum(args[0], puck, ok)
toNum(args[1], sample, ok)
tx = "Mounting sample " + toString("", puck) + ":" + toString("", sample)
tx = "Mounting sample " + toString("", puck) + ":" + toString("", sample)
//taskCreate "mount",10,mount(puck, sample)
break
default
ex = "Invalid command: " + cmd

View File

@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Programs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.staubli.com/robotics/VAL3/Program/2">
<Program name="simulateEvents">
<Parameters xmlns="http://www.staubli.com/robotics/VAL3/Param/1">
<Parameter name="interval" type="num" xsi:type="element" />
</Parameters>
<Locals>
<Local name="str" type="string" xsi:type="array" size="1" />
</Locals>
<Code><![CDATA[begin
while true
delay(3)
delay(interval)
if isPowered()
str = "ON"
else

View File

@@ -12,7 +12,7 @@
taskCreate "com_modbus",10,comModbus()
taskCreate "com_tcp",10,comTcp()
taskCreate "sim_ev",10,simulateEvents()
//taskCreate "sim_ev",10,simulateEvents(interval)
while true
movel(pForce1,flange,mNomSpeed)