Comments (5)
"1" is a string, isn't it ? Does this work:
symbols.Write("MAIN.boolVar", 1);
Yeah, thats a bug because we handle uint8_t just like the other integer types but stringstream interprets it as ascii. I have a fix ready will release soon together with the string handling issue #194
from ads.
"1" is a string, isn't it ?
Does this work:
symbols.Write("MAIN.boolVar", 1);
from ads.
No, there is no such function signature ...
from ads.
Good catch! I switched to using AdsVariable
for those types but I wonder if there should not be more overloads like Write(string, bool)
to avoid the string conversion all together?
Is there actually a technical difference between those two APIs? Do they result in different data being send to the PLC?
from ads.
Yes, there is a huge difference AdsVariable with handle is much safer! Accessing PLC variables "directly" by index group and offset is pretty dangerous, because you can silently corrupt the memory when the PLC did an online change for example. SymbolAccess was meant to demonstrate how access PLC variables in a generic way. A better version of SymbolAccess::Read/Write would generate a handle and use the handle when accessing the variable on the PLC.
However, the bug about ASCII instead of integer for BOOL values should be fixed with d7ada12
from ads.
Related Issues (20)
- How to Dynamically Read Struct Symbols and Obtain Subsymbol Values Using the Beckhoff ADS Library in C# HOT 1
- Ping an AMS NetId HOT 7
- Two application running on the same machine that read a variable from the same plc concurrently HOT 8
- Use std::function for callback HOT 1
- ADS-sum command: Read or Write a list of variables with one single ADS-command HOT 1
- impossible to compile under ubuntu 20.04.5 HOT 1
- CMake Error at CMakeLists.txt:40 (install): install TARGETS given target "ads" which does not exist in this directory. HOT 3
- Unreachable PLC Blocks All Other Operations During Timeout Period HOT 2
- Reading route using `adstool`
- Will beckhoff officially launch the golang version of the ADS API HOT 2
- ADS Server HOT 1
- Async WriteReqEx HOT 5
- AdsNotification cycle time deviation HOT 2
- RGB Image over ADS HOT 1
- Port: 30000 already in used as 0x7ffe55930ed0 terminate called after throwing an instance of 'AdsException'
- Passing IP from terminal
- ADS Connection Error With Docker Container HOT 1
- CMake build failing HOT 2
- ADS READ for TwinCAT Motion
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ads.