Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BoolPlcMapper not returning properly #339

Closed
BMac099 opened this issue Apr 28, 2023 · 1 comment
Closed

BoolPlcMapper not returning properly #339

BMac099 opened this issue Apr 28, 2023 · 1 comment

Comments

@BMac099
Copy link

BMac099 commented Apr 28, 2023

Can't get bool to work, always returns False, other types (DINT SINT INT STRING) all work fine.

Private Sub AGVPhotoEyeState()

    Try
        Dim myTag = New Tag(Of BoolPlcMapper, Boolean)() With

{
.Name = "PROGRAM:Robot_1_Plant_AGV.AGV.R12.AGV_Detection_PE",
.Gateway = "10.1.192.18",
.PlcType = PlcType.ControlLogix,
.Protocol = Protocol.ab_eip,
.Path = "1,0",
.Timeout = TimeSpan.FromMilliseconds(5000)
}
myTag.Initialize()
myTag.Read()
Pe_state = myTag.Value
Panel1.Invalidate()

        Debug.WriteLine("AGV PE State = " & Pe_state)

    Catch ex As Exception

        Debug.WriteLine("Exeption in AGVPhotoEyeState, " & ex.Message)
    End Try

End Sub
@timyhac
Copy link
Collaborator

timyhac commented Apr 28, 2023

Hi @BMac099 - there is some discourse on this subject here that may help:
#178

If the provided mappers don't do what you need, you can always create your own.

@timyhac timyhac closed this as completed May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants