January 17, 2019, 09:39:30 PM
Robotforum | Industrial Robots Community

 write code Read string Analog input from sensor distance?


Author Topic:  write code Read string Analog input from sensor distance?  (Read 202 times)

0 Members and 1 Guest are viewing this topic.

January 03, 2019, 09:51:11 AM
Read 202 times
Offline

mrvanphuong


Heeyy all! I have one question. I conected sensor distance to IRC5 controller when i want write program Rapid read string Analog of sensor. How can i used ?

Linkback: https://www.robot-forum.com/robotforum/index.php?topic=30204.0
  • Like    Thanks

Today at 09:39:30 PM
Reply #1

Advertisement

Guest

January 03, 2019, 12:48:20 PM
Reply #1
Offline

Lemster68


An analog sensor should be sending voltage or current.  What do you mean?
  • Like    Thanks

January 04, 2019, 01:07:43 AM
Reply #2
Offline

mrvanphuong


An analog sensor should be sending voltage !
  • Like    Thanks

January 04, 2019, 02:09:45 AM
Reply #3
Offline

SAABoholic


Technically an Analog sensor could be both, but - you're using a sensor tied into an analog I/O measuring volts (or distance in your case).

You could (should) change the logical min/max values in the analog configuration to match that of your sensor, i.e. if 10V represents 300mm you set your your logical max to 300.

As for presenting it on the teach pendant you need to convert the sensor value to a string, i.e.

TPWrite "Distance="\Num:=aiMyDistanceSensor;

or, if you want to get fancy...

TPWrite "Distance= "+NumToStr(aiMyDistanceSensor,2)+" mm.";
  • Like    Thanks


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

question
Read Analog Input on a KR C2 edition 2005

Started by h4p0 on Fanuc Robot Forum

1 Replies
448 Views
Last post January 23, 2018, 10:01:47 PM
by K-Sky
question
Read Analog Input on a KR C2 edition 2005

Started by h4p0 on KUKA Robot Forum

2 Replies
483 Views
Last post January 24, 2018, 12:26:00 PM
by panic mode
xx
Unable to Read string data through COM port but able to Write through same port

Started by mikevillan26 on ABB Robot Forum

8 Replies
377 Views
Last post December 26, 2018, 02:46:00 PM
by Lemster68
xx
How to read the string of TOOL_NAME[1,]

Started by irobot on KUKA Robot Forum

7 Replies
3882 Views
Last post December 12, 2014, 02:28:22 PM
by SkyeFire