Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

A couple of questions on How to do it

For general discussion related FlowStone

A couple of questions on How to do it

Postby cbarberis » Thu Dec 06, 2012 2:56 am

Hello,
I am brand new to Flowstone and I am getting to like it, but like every neophyte I tried learning by doing but did not get very far in accomplishing what I wanted to do. I did go over the tutorials and many of the examples but never really found an answer for both of my question. I am sure that that what I am trying to do is probably very trivial to most on this forum, so here are my questions:
I am trying to make a very simple TCP terminal that sends out ascii commands via a push button and receives data back into a gui text-box
Question#1 My reply data coming back to me has a series of strings formatted using a printf() so the last two bytes are a '\n' and '\r' (new-line and carriage return) but my text-view box does not seem to respond to new-line or carriage returns it just keeps overwriting the new text from left to right on the same place of the text-view box. How do you get to show multiple incoming lines like in a terminal???? I tried many things but nothing works.

Question#2. I need to be able to send via TCP 10 different string commands using 10 different gui buttons, so when I press one button, I send one string command and when I press another button I send another string command,and so on.
The problem is that the TCP module only has a single string input. So I guess I would need to enable 1 of ten strings into one input via 10 buttons.......Have not figured that one out yet!

Any help or guidance would be greatly appreciated!!........Thank you all.
cbarberis
 
Posts: 2
Joined: Tue Nov 09, 2010 10:08 pm

Re: A couple of questions on How to do it

Postby MyCo » Thu Dec 06, 2012 3:47 am

Here is a demonstration how you could do it. There are propably a dozen other ways, but that are the simplest.
Attachments
cbarberis.fsm
(4.63 KiB) Downloaded 1115 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: A couple of questions on How to do it

Postby cbarberis » Thu Dec 06, 2012 6:37 pm

Thank You SO MUCH!!!!!
I will try not to take advantage and keep asking for help, but I do have two more questions:

I find it extremely complicated to make a GUI front panel, tried to put borders around objects and background colors, when I tried using background colors they seem to take over the fore ground and hide all my controls on the panel. The other thing I find extremely frustrating that when I use an GUI EDIT BOX when I make an executable and run it it appears that any entries on that edit box go away until I click on another edit box, tried changing the preferences to no avail. Is there a reason as to why guy components don't have frames around them that can be adjusted and be visible when used on an executable? I have uploaded my first program. All I wanted to do was to put a border around all my text boxes and not have my edited text boxes loose their visibility when I click outside of them.
Attachments
IIO-TCP1.fsm
My first attempt at something useful
(31.56 KiB) Downloaded 1016 times
cbarberis
 
Posts: 2
Joined: Tue Nov 09, 2010 10:08 pm

Re: A couple of questions on How to do it

Postby Jay » Fri Dec 07, 2012 12:29 am

Hi there!

Well i thought it was a Ruby error that was causing this weird switching effect with your txt vanishing from the edit boxes so i imported the old edit box from Synthmaker which does not have Ruby into flowstone and it still happens but, if i export the very same setup out of Synthmaker the effect is gone!

i have exported the two exe's so you can see that SM edit Boxes work in an SM export but not from a flowstone exe proving that it is not you it is a bug in flowstone itself

edit test.png
edit test.png (80.72 KiB) Viewed 23182 times


SynthMaker Application.rar
(1.49 MiB) Downloaded 1169 times


flowstone application.rar
(1.72 MiB) Downloaded 1123 times


now you can post a msg for the devs and do your first bug report! :)

hope this helps
Jay
 
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: A couple of questions on How to do it

Postby MyCo » Fri Dec 07, 2012 9:53 am

The editbox thing looks weird... can't say anything about it yet. But here is a step by step "optimzation" for your schematic.

1. step: Triggers don't need "or" or "xor". They don't carry any data! You can connect all triggers directly to the final input. In the attached schematic you see, I've removed all of the "or" and "xor" and connected the triggers directly to "send"
Attachments
IIO-TCP1 (MyCo Step1).fsm
(31.48 KiB) Downloaded 1024 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: A couple of questions on How to do it

Postby MyCo » Fri Dec 07, 2012 9:56 am

2. Step: All green connections are triggered. So if you change something you automatically get a trigger with it (unless you block it). So instead of connecting all triggers to "send" you can connect the string that changes to the send trigger input. But you have to be carefull, the trigger connection has to be made AFTER the string connection. See attachment
Attachments
IIO-TCP1 (MyCo Step2).fsm
(31.45 KiB) Downloaded 1050 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: A couple of questions on How to do it

Postby MyCo » Fri Dec 07, 2012 10:02 am

3.Step: Make Modules! You don't need to have everything on the top level. Group elements that do the same, to a group (In FS, that are modules). That's how to do it: Select all items you like to group, right click -> Make Module
Attachments
IIO-TCP1 (MyCo Step3).fsm
(31.49 KiB) Downloaded 1100 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: A couple of questions on How to do it

Postby MyCo » Fri Dec 07, 2012 10:08 am

4.Step: A simple solid background can be made with only a few primitives. I've added it, with unscaled dimensions.
Attachments
IIO-TCP1 (MyCo Step4).fsm
(31.56 KiB) Downloaded 1065 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: A couple of questions on How to do it

Postby MyCo » Fri Dec 07, 2012 10:10 am

5.Step: Scale the Background. To do that, go to the front panel, when it's selected, click the "lock" icon, to unlock the panel editor, and scale the background image.
Attachments
IIO-TCP1 (MyCo Step5).fsm
(31.57 KiB) Downloaded 1079 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: A couple of questions on How to do it

Postby MyCo » Fri Dec 07, 2012 10:13 am

6.Step: When the front panel editor is unlocked, right click on the background module and then click "send to back". And inside the module you can select the background module and then click the "two rectangles" icon, to minimize the front panel, so you don't waste space
Attachments
IIO-TCP1 (MyCo Step6).fsm
(31.57 KiB) Downloaded 1033 times
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Next

Return to General

Who is online

Users browsing this forum: No registered users and 82 guests