RobotStudio event

Send TCP y'' coordinate to PLC via Profibus S4C+

Hi, 

I've got a robot with a S4C+ controller, and I need to send the tcp y'' coordinate to a PLC via profibus.

I understand I can obtain the y value with the function CPos which is data type: pos,
At the moment the system only uses Digital I/O signal.

As I'm new to all of this,
could someone help me to understand how will I be able to send that variable via profibus ?

 Will I need to convert   this "pos data type " to num, int or word ??? will I need to
re-configure the robot Profibus using Softing Profibus DP Configurator ?

Many thanks
  

Comments

  • I would configure it as an "analog" signal.  That is, you can map it kind of like a group output but in the configuration you tell it to treat it like analog.  That way you do not need a real analog card, you can send it over the profibus.  I have posted some examples of such on here for other users.  Try searching for similar posts or look through my posts.  You simply put SetAO AOmyYposition, myCurrentpos.trans.y;  Use the CRobT function to get the current position first.  Do you have multitasking?
    Lee Justice
  • Thanks for your advise. Yes, I do have multitasking, will I need to create a new task to obtain this value in real or close to real time? 

    Thanks
  • I think that a background task is a good way to go about it.
    Lee Justice