AdvancedHMI Software

General Category => Feature Request => Topic started by: Homie on November 21, 2016, 03:54:16 AM

Title: An option to clear strings in the CLX driver
Post by: Homie on November 21, 2016, 03:54:16 AM
Righ now, sending an empty string to the CLX results in the driver just doing nothing.
In my project I have to clear strings from time to time frequently.
As a workaround, I send a string like "empty" to let the CLX clear the Tag.

By the way.
Is there an easy way to handle UDTs? Maybe let the driver just read the number of bytes a UDT member has.
I know I can copy them into Bytearrays in the CLX and read that.
But it happens that I can't change the logic of the maschine.
Title: Re: An option to clear strings in the CLX driver
Post by: dmroeder on November 21, 2016, 10:24:01 AM
As for the string, just do something like this to clear it out:

Code: [Select]
  EthernetIPforCLXCom1.Write("StringTag", "")
I tested it in 3.99r and it worked fine.

As for UDT's, I think if you read a tag that is a UDT, it will return the bytes.  It's up to you to figure out what the data is in the results.  Try it:

Code: [Select]
Dim ret As String = EthernetIPforCLXCom1.Read("MyUDT")
MessageBox.Show(ret)
Title: Re: An option to clear strings in the CLX driver
Post by: Homie on November 21, 2016, 04:26:22 PM
Think U are right.
I had a similar thread about the issue already, and I misinterpreted/misunderstood Archies answer.
The driver doesnt write anything, if the string is NULL.
But it should write a "".


By the way. The standalone driver works fantastic.