03-22-2020 05:52 AM
Hello. I have to make a state machine which paint. I have already managed to do it, but the problem appears when I want to save the created image or load new picture. Every time I have error number 1. Would someone be able to help me?
Solved! Go to Solution.
03-22-2020 06:48 AM
Can you save your source to a previous LabVIEW version? Not many people have the latest version installed.
03-22-2020 07:24 AM
Here is latest version 🙂
03-22-2020 08:27 AM
Seems that Write PNG File.vi returns error 1 if the image you want to save is empty. This can happen in your program if you never draw anything and save the image. Also, in your SAVE case you write the image shift register with default value (empty picture) which means that after saving, the image displayed in the picture control is not the same with what you have in memory and if you want to save again without adding anything new, you'll get error 1.
I suggest you use an event structure in your "Idle" case instead of the logic you have there and add a value change event for each button where you decide in which state to go. Buttons mechanical action can be changed to latching and you will no longer need the waiting function.
03-22-2020 12:54 PM
When you read the picture, you are converting the image data to a picture, but never use the output.
(Make sure you understand the difference between an input and an output!)