09-26-2016 01:57 PM
Im sending G-codes(which is a string in this case) to my board, Im using event structure to choose to sent which code, while sending as string constants program runs without problem, but when Im obtaining the string with format into string program dosnt sent the code in that event but its sents when the events changes( so in other event it runs previous one too)
problem can't be seen in highlight execution too
Solved! Go to Solution.
09-26-2016 01:59 PM
Hi 6a,
whenever you have a problem with a specific VI you should attach that VI here!
Generic answer an your question: When you have problems in using FormatIntoString you should read it's help page and use proper format strings…
09-26-2016 02:10 PM
I have no problem with formatintostring I can obtain what I want, my inside of events work perfectly the problem is event6 doesnt work until another event kicks in like when its 6 it doesnt work but when I change to 5 it runs 6 first after that it runs5
09-26-2016 02:24 PM - edited 09-26-2016 02:24 PM
You didn't send a VI like Gerd asked, just a couple screenshots.
Those show two events, each one sends a string when a particular button is pressed.
The problem you are describing doesn't make any sense. But if you attached a VI, we could see everything that is going on, play with it, and see if it is acting the same way for us.
Do you need to send a termination character with your command?
09-26-2016 02:34 PM
Yeah it doesnt make any sense I know, here is the vi
09-26-2016 02:37 PM - edited 09-26-2016 02:37 PM
Im sending directly the gcodes to the board all the event except 6 runs perfectly but 6 doesnt waits to run after the event changes it runs which makes no sense
09-26-2016 02:44 PM
I'll ask again: Do you need to send a termination character with your command?
Your 4 home button events all have commands that end in the line feed character. Your other events do not. My guess is that the device does not recoginize it has received a full valid command until it gets the line feed character.
PS: Those button terminals all belong in their respective event cases.
09-26-2016 02:51 PM
Thank you that solved my problem , I can't believe I forgot to add one line below, I deliberately did that in home cases yet I didn't add on last event or even saw it's missing. Anyway thanks again
Even though I limited the instance to 1 even cases runs twice most of the time, How can I solve this?
09-26-2016 03:18 PM - edited 09-26-2016 03:20 PM
Change the mechanical action on your buttons to Latch When Released (and move the buttons in the event case.) Right now you are Switch Until Released which generates a value change event when you press it down and when you release it.
(PS: This is why many of us insist that people post real VI's when asking for help. We can't see other event cases from a screen shot to clue us in to what is going wrong. And we certainly can't tell from an image what is the mechanical action of a button.)
09-26-2016 03:58 PM
Thank you again, I understand where the problem is, Is there an another solution i want to keep them as buttons not switches.( I dont want to see them as pressed all the time)
And I know I ask a lot ( Im quiet new to Labview)at event's outputs I use default if unwired, which makes them 0. Is there a way to not change them when unwired?