Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.
Setting virtual signals from API
Mikael
✭
in RobotStudio
Hi again,
I have another question:
Is it possible to set the value of a virtual signal from the API? I can access signals via the Station.VirtualSignals[string] property, but I receive an object of type object. I have been looking through the API but cannot find any signal types. Is there any way to access the signals and chage their value?
Best Regards,
Mikael
0
Comments
-
Yes it is.
If you have an analog signal, you can set its value with:
double x = 156.00;
station.VirtualSignals["AnalogSignal"] = x;
If you want to set/reset a digital signal:
station.VirtualSignals["MySignal"] = 0; // 1 to set it
// Emil
0 -
Excellent!
Hard to know since the type I receive is an object, but it goes through the compiler so I guess it is all good!
Best Regards,
Mikael
0
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 16 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 366 IRC5
- 86 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 856 RAPID Programming
- 40 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings