Perform calculations with weight
I need to subtract a fixed tare from a weight that I capture from a scale using the COM port.
I have tried with the following expression:
Value = Format.NamedSubStrings ("weight"). Value - 0.110
This expression gives an error and I think it is because the weight is in text format and I need it in number.
Thanks for your help.
0
-
Have you set the VB to be Event Controlled > Post Prompt so that it only tries to carry out the process once there is data to work with?
1 -
This solution worked for me! I had been using the wrong event to capture my weigh scale output. And so my translation was happening too soon, before the VB Script was acting. I just moved my offset into the VB Script to guarantee correct order.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare