0.0001 and smaller numbers written to tags


Im creating a pilot project & ive found some curious actions with very small numbers. The resolution im hoping to work with is 0.000010

I noticed that ignition 7.9.12 wouldnt always respond when i would write to a tag with a value smaller than 0.001000. I swapped between float & double, but it still wouldnt always take. Ive also adjusted the meta data of the tag to “#,##0.000000” to always display the resolution im after.

I built out some buttons that simply write values to a tag to help iron things out. Here is the outline of what i found:

button1: writes 0.000000 to “tagX” & prints to the console.
button2: writes 0.000010 to “tagX” & prints to the console.
button3: writes 1.000000 to “tagX” & prints to the console.

Here are the patterns that i found:

  • tag starts @ zero. button 3 will write a “1.000000” to the tag. Button 2 will then write 0.000010 to the tag. After this, button 1 will not write “0” to the tag once its this small. have to press button 3 to change the tag back to “1” before a zero will take. Print console shows the variables as they should.
  • tag starts @ zero. button 2 will not change the tag to “0.000010”

What seems to be taking place is that anything smaller than 0.001000 registers as a zero. ive shifted my generic button values all around to highlight this pattern

Are there any functions that i can use to make this work?

I could write the value to a string…but im nervous to lose content in the translation since small numbers are not registering correctly each time. I could also scale my math to remove the small number content & shift the decimal, but now a level of complexity is being added to the project that im hopeful to avoid.

Any insight would be quite helpful. Thanks!

Each tag has a Deadband property that you can set as needed. It defaults to 0.0001.

well that sure was easy! TY for the answer that fixed the problem. I appreciate it!!

ive noticed that the calculator icon shows up when increasing the resolution of the deadband. any adverse effects if i change it to 0.000001?