ANSL communications, edit "TargetAddr=" IP at runtime


We are using ANSL to talk between different machine types, but we have a certain machine which could talk to many different devices and multiple at the same time depending on the line configuration. I was hoping I would be able to set the IP address from the HMI at runtime for the TargetAddr in the data object. Is there a way I can write to a STRING variable within the data object?

This is the same for when we have multiples of the same machines on one network and we need to reassign addresses for what talks to which machine.

Connection ConnName=DoublePoseidon TargetAddr= AnslPort=11169 Timeout=5000 SendDelay=2 BfSize=65536 ConnMode=0 RRConnPrio=0 EnableSSL=0


This should be possible using the DatObjWrite FUB.
There is a sample available in AS with which you can read from or write to an existing dataobject, also using a STRING var.

If the dataobject is altered, you might need to restart the ANSL comm.
Hope this can help!

1 Like

Hello @whyleys,

Due to one month of inactivity, this post will be marked as solved. If you would still like assistance on this topic, please add a new reply with the latest status. :slight_smile:
Thank you

1 Like

@jan.van-de-wielle Thank you very much for your response this looks great and I’m confident this solves my problem.

@lukas.struber sorry I left this open as I haven’t had chance to test yet but happy to mark as solved.

Thanks guys! :slight_smile:

1 Like

Thanks for the the clarification! :slight_smile: