MotionController Axis MultiAxis IO IOPoint NetworkNode RsiError
Sample Apps Changelog

RapidCode API

◆ AnalogInGet()

int32 AnalogInGet ( int32  analogChannel)
pure virtual

Get the value of an analog input.

Description:
AnalogInGet returns the value of an analog input. It is passed a starting channel ID relative to the Node (not Segment).
Parameters
analogChannelThe analog input number on the node, starts from 0.
Returns
(int32) Value of the analog input.
Sample Code:
Get the Analog Input value on [channel].
// -- C++ -- //
printf("Analog Input %d is %ld.\n", channel, io->AnalogInGet(channel));
// -- C# -- //
Console.Writeline("Analog Input {0} is {1}.", channel, io.AnalogInGet(channel));
Note
Slice I/O has multiple segments of same type (Digital/Analog In/Out) which are grouped together. The reference number for any channel of a given type

can be defined as when it is encounted relative to the Slice I/O Node or an individual Slice.

 
Examples
VelocitySetByAnalogInputValue.cpp, and VelocitySetByAnalogInputValue.cs.