Scripting for value led output

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
richie1087
Newcomer
Posts: 2
Joined: Mon Feb 04, 2019 5:26 pm

Scripting for value led output

Post by richie1087 » Mon Feb 04, 2019 5:39 pm

Hi,

I am trying to create a label which contains two variables. These two variable inputs are then subjected to 4 different formula to output 4 different fields. Each of these fields denotes a weight. What I want to do is this, the formula works out a weight - if it is 1 or more then the output is measured in tonnes. If it is less that 1 then the output needs to be in Kg.

For example, an input of 4 give a result of 1t. An input of 2 gives a result of 500kg.

I'm pretty confident I can work out how to do the formula to get the result I need - but it's getting NL to output tonnes or kilogrammes as necessary.

Can anyone help?

Many thanks

Rich

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 293
Joined: Mon Aug 28, 2017 3:07 pm

Re: Scripting for value led output

Post by Kyleodonnell » Mon Feb 04, 2019 7:42 pm

Richie,

Do you have a sample label that you can attach? We are not quite understanding what you are looking for.

richie1087
Newcomer
Posts: 2
Joined: Mon Feb 04, 2019 5:26 pm

Re: Scripting for value led output

Post by richie1087 » Tue Feb 05, 2019 1:53 pm

Hi,

I'll try and explain better.

These labels are used on harnesses and have a weight limit. These limits can vary between 1 kg and 10 t.

I currently have a formula that works out the weight limit. But it is all in tons. What I want to try and achieve is this: If the weight limit is below 1 ton, then the weight limit is converted into kgs.

This is the label that I am working with.
Attachments
RIDGE1.nlbl
(5.57 KiB) Downloaded 43 times

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 293
Joined: Mon Aug 28, 2017 3:07 pm

Re: Scripting for value led output

Post by Kyleodonnell » Tue Feb 05, 2019 2:16 pm

Richie,

You would most likely need to use a linear equation function or script to figure out the math of what the conversion is from KG/T which can be found here https://www.metric-conversions.org/weig ... ograms.htm and then use a Vb script to set a variable based on if something is less than a certain value.

Post Reply