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.

Trouble reading SINT Array

See original GitHub issue

This is more of question, I could be possibly doing something wrong. I am able to read each type of tag individually, I am able to read each type of Array, but for some reason SINT is not returning an array, like all the other types. I can read a SINT indivual tag, and also an individual array index, but not array. Looks like is returning hex values? I haven’t worked with sbyte before, should I be casting to something else?

Thanks for the help!

 private async Task<sbyte[]> ReadSintArray(string tagName, int arrayLength)
{
    var tag = new Tag<SintPlcMapper, sbyte[]>()
    {
        Name = tagName,
        Gateway = _ipAddress,
        Path = _path,
        PlcType = PlcType.ControlLogix,
        Protocol = Protocol.ab_eip,
        Timeout = TimeSpan.FromSeconds(_timeout),
        ArrayDimensions = new int[] { arrayLength }
    };

    await tag.InitializeAsync();
    await tag.ReadAsync();

    return tag.Value;
}

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
TheFern2commented, Mar 5, 2021

@timyhac I have switched to v1.0.4-beta.1, I’ll let you know if I run into any issues.

1reaction
timyhaccommented, Mar 4, 2021

P.S. - @TheFern2 - would appreciate if you could use the v1.0.4-beta.1 during development. There are a few bug fixes regarding async/await, but its also a fairly significant refactor.

I’m just waiting for feedback from testers before marking as a proper release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Displaying SINT[64] Array Values on HMI [Text] - PLCS.net
We noticed that just reading in a tag that is a SINT alone, that the value shows just fine. Maybe it has trouble...
Read more >
Convert from SINT data type to String in Rslogix : r/PLC
Hello all, I receive an array of messages from a remote device. The message is stored in an array of SINT, and shown...
Read more >
Number array to string AOI - PLCS.net - Interactive Q & A
Hey guys. I'm hoping you can help me out. I've created an AOI that will convert an array of type SINT, INT, or...
Read more >
Reading a file into an array with fortran: skipping multiple ...
I am having trouble reading a large ascii file (with a 6 line header) into an array. Here is the relevant code... !...
Read more >
ControlLogix Arrays - Ignition
for my current application, i want to read in an array from a controllogix PLC as a dataset without scripting, so i can...
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