LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Separate decimal number to array of numbers


aPpErEnTiCe wrote:

We have connected the circuit, and we get an eror when we execute it. We get an error msg if the output is less than 100.



OK, so you want to send three nibbles to the device.

 

You are doing this way too complicated:

  • You are dealing exclusively with integers, there should not be any orange wires on the diagram. Set the correct representation.
  • Your formula node should be replaced by a case structure with four cases
  • Stay with numeric data types. There is no need to go to strings and back.
  • Use arrays of booleans as indicators. One terminal is simpler than four and there is less wiring.
  • You don't need to send the same data millions of times per second, use a reasonable wait in the loop.
  • Even better would be an event structure so the data only updates when the inputs change (not shown).
  • The result could be negative (subtract mode). You also need to handle underflow (result<0)
  • ....

 

Here's a quick draft on how it could look like. I don't know how your DAQ assistants are configured, but simply hook them up at the obvious places. 🙂

 

Make sure you understand every aspect of the code!

 

 

 

0 Kudos
Message 11 of 11
(367 Views)