01-27-2022 12:29 PM
Hello all!
I'm designing a tester that reads from a dial indicator continuously (Mitutoyo) and when a certain value is reached (2mm) i want to send a command to another visa port (to slow down motor) i then want to have it detect the next value (4mm) and return the arm to starting position.
My current issue is converting a constant decimal string into a number value.
Ive tried lowering the bytes at port to only include 2 decimal places (xx.xx) but in reality the string is constantly repeating. (1.0001.0001.0001.0001.00) how can I pull one offset to the right of the decimal and only 4 digits.
please excuse my spaghetti im still learning.
Solved! Go to Solution.
01-27-2022 01:21 PM
Use Cancatenate String and End Of Line Constant to append a termination character to the messages you are writing.
01-27-2022 01:53 PM
crossrulz i believe i was just watching your video on proper serial communication. thanks ill add termination characters.
01-27-2022 03:04 PM
I'd like to comment that your code wasn't spaghetti code. It was obvious that you tried to organize it. Now there are common errors like the duplicate code that can easily be turned into one subVI, and there are places when wires run under things, are hidden by other wires, and stuff, but that's not spaghetti code. THIS is spaghetti code: