ndVput
(Library)
Transfers the position posture to an external device (RS232C input/output).
ndVput (<Storage variable type>, <Storage variable number>)
This statement provides a similar function to a VPUT instruction in the conventional language.
If <Position variable number> is negative:
The system transfers the robot's current position coordinates (the home position coordinates in the tool coordinate system when the tool is defined.) and a posture or contents of the position variable to an external device.
If <Position variable number> is positive:
The system transfers a storage variable type and contents of the position variable designated with a storage variable number, to the external device.
Requires file <pacman.h>
#include <pacman.h>
|
|
PROGRAM PRO65
|
|
FLUSH
|
|
CALL ndVType(1)
|
'Sets the protocol (Conventional = 0/ New = 1)
|
CALL nsVrst
|
'Initializes the external device.
|
CALL ndVis(4)
|
'Starts up the external device (Sends 03).
|
P1 = (1,2,3,4,5,6,7)
|
|
J1 = (11,12,13,14,15,16)
|
|
T1 = (21,22,23,24,25,26,27,28,29,30)
|
|
CALL ndVput(pacPOS,1)
|
'Sends the data of variable "P1"
|
CALL ndVput(pacJNT,1)
|
'Sends the data of variable "J1"
|
CALL ndVput(pacTRN,1)
|
'Sends the data of variable "T1"
|
END
|
|