Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Abb s4c+ Postprocessor modification for IO
#1
Hi ?

我们目前有一些问题s concerning the post processor for an abb s4c+ Controller. The robodk s4c postprocessor now generates
SetDO D_OUT_3 when we load the program the controller want is to change it to DO_03

We have run the program and did a manual replacement of the SetDO D_OUT_3 to DO_03 in visual studio code an that works.

We looked at the base post, but need to go deeper in the post. Obviously we want the postprocessor to do the correction how can we approach the issue here. Can someone elaborate on this!

Regards de besturing


Attached Files Thumbnail(s)

#2
You can simply override the setDO function inside your RobotPost class by using a function like the one below.

I attached the post processor I believe you need.

Code:
class RobotPost(BasePost):

def setDO(self, io_var, io_value):
"""Set a Digital Output"""
if type(io_var) != str: # set default variable name if io_var is a number
io_var = 'DO_%02i' % io_var

if type(io_value) != str: # set default variable value if io_value is a number
if io_value > 0:
io_value = '1'
else:
io_value = '0'

# at this point, io_var and io_value must be string values
self.addline('SetDO %s, %s;' % (io_var, io_value))


Attached Files
.py ABB_RAPID_S4C_Custom.py(Size: 5.33 KB / Downloads: 67)
#3
Hi Albert,

For future modifications of the post can we adjust and use your attached script to do the same for DI, AO, AI, or do you have to do this ? (were learning here... steep learning curve :) Were grateful for the added post-processor/script, next Monday we will be testing the new post with added script for the DO (Digital out) in conjunction with the hardware that's connected to the robot controller Output.

Another Thank You!!

Regards The Besturing
#4
Yes you can fully customize the post processor, including setting analog outputs and more. You can contact us by email requesting the source code of the original post processor and we can provide it to you.

More information about customizing post processors here:
//www.sinclairbody.com/doc/en/Post-Processors.html#EditPost




Users browsing this thread:
1 Guest(s)