Hexadecimal counter 追蹤

0
Avatar
Mark Weir

We have a hexadecimal mac address set up and are using the hexadecimal counter function. As we need the label printed in the following format for example 00:00:00:FA:08:F9 When the hexadecimal counter gets to FF it does not recognise to increment the 08 digit to 09 but continues on to 100, the colons seem to be affecting the counter. It there any way to use the counter so it is not affected by the colons. On other softwares you can add an output mask so it adds the colons but does not affect the counter. Any help would be appreciated

4 意見

0
Avatar
Pete Thane
評論操作 永久連結

Hi Mark,

That looks an odd one and I wonder if you need to raise the issue direct with Seagull Tech team as it looks like a bug to me. 

You should be able to use the Character Filter > Input Mask option for the Hex characters with colons but for some reason this is not working and I am using the latest version and so 00:FF becomes 00:100 instead of 01:00

The only way I have been able to get this to work is by adding a text field made up of a series of VB Script > Multi-Line Script > OnSerialise fields and then used truncation to strip and keep the respective pairs of characters as per the images below.

I hope this helps to get you up and running.

The image above shows the VB script I have used. For the Auto-Selected Event I used the line Value = "000000" so that the Truncation would leave 00 on the label when you look at it on the screen before printing. In the image below the data field that shows "000000" is the field that increments and so I could reference it in the other fields I used the Change Data Source Name button with this and called it "The Counter" and so it therefore appears as a Named string in the right hand column of the VB editing field allow me to type the Value = and then double click on "TheCounter" to add the link in the VB. 

You can add new sub-strings via the New Data Source button highlighted in the column on the left. The string shown in the middle of the 3 strings and I added the colons as prefix and suffix characters although these could be added as extra Embedded Data sub-strings themselves. 

 

0
Avatar
Al Perez
版主
評論操作 永久連結

Hi Mark, thanks for reaching out to us, I appreciate your post!

Like with Pete, this does seem like a bug to me. I'll go ahead and reach out to my team about getting this reported; for now, see if Pete's solution works for you while I continue to investigate this.

Another way of working around this is to set an object outside of the label that keeps track of serialization (which works if you're not using the colons, as you noted) while  you set a second object that takes the values from that first object, but then using an output mask (I tried testing to see if we can use both in the same object, but I think this may be part of the issue):

 

When we print preview this, you can see that it works:

 

Let us know if this works for you in the meantime!

0
Avatar
Mark Weir
評論操作 永久連結

Hi Al/Pete,

Thanks for this the work around works perfectly

Cheers,

Mark

0
Avatar
Pete Thane
評論操作 永久連結

Glad you are up and running Mark. Maybe when BarTender 2021 R2 is released there is a fix for this, but I know sometimes it can take its time to come through.

Hadn't thought of using the Object route, but that is a lot simple method to implement than my variant with the VB, nice one Al! 

登入寫評論。