question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Boolean Strange Results

See original GitHub issue

Hi, I am unable to write to a boolean single tag to make it go false, it does however work for making it true. I also tried a boolean array individual index, and I can make the first index BaseBOOLArray[0] true or false with no problems, but nothing else in the array. I haven’t tried writing to an entire array yet.

I tried both async and non async with same results.

var tag2 = new Tag<BoolPlcMapper, bool>()
{
    Name = "BaseBOOL",
    Gateway = "192.168.1.196",
    Path = "1,2",
    PlcType = PlcType.ControlLogix,
    Protocol = Protocol.ab_eip,
    Timeout = TimeSpan.FromSeconds(5)
};

tag2.Initialize();
tag2.Value = false;
tag2.Write();

I am on version 1.0.4 stable, I tried on 1.0.3 with same results.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
TheFern2commented, Mar 11, 2021

@timyhac with the separate new bool mappers, everything is passing. Bool arrays worked previously, but I went ahead and still use your new mapper. Individual bool tags are now passing the unit tests. 🎉

image

I rarely use multi dim arrays in my line of work, but I will still test it anyways. I’ll update here shortly.

1reaction
timyhaccommented, Mar 10, 2021

Thanks for doing this - that does narrow it down.

So it could be either:

  • libplctag.NET should not use the bit accessor APIs for bool tags.
  • There is an issue with libplctag core around these methods.

@kyle-github - are the bit accessor methods suitable for ordinary BOOL tags and/or BOOL arrays?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Boolean operations consistently producing weird results
Your bottom faces seem coinciding, Booleans don't like coplanar faces, it can't figure out what way is in what is out. – Duarte...
Read more >
Strange behavior when defining a value for True in Python
There are two "True"s: one is a boolean value, and the other is the variable called True; initially, they're equal to each other....
Read more >
Boolean modifier problems and how to solve them
For instance, an object with scaling that is not reset will get weird results when you use certain tools on it. I hope...
Read more >
Strange Boolean Difference failure behavior. What's wrong?
I have a simple element that I'm trying to cut into using a pipe. The pipe was formed from curves projected onto the...
Read more >
3ds Max 2023 Help | Fixing Boolean Problems
Fixing Boolean Problems. Boolean operations are a powerful addition to your modeling toolbox; however, they can sometimes give strange or unexpected results.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found