Skip navigation.
Home
The QNX Community Portal

View topic - Realtime Problem (School Project)

Realtime Problem (School Project)

Isn't the name clear?

Realtime Problem (School Project)

Postby hurricane29 » Mon May 11, 2009 11:49 am

I have to make a graphic representation of a roboter (s. pic) which has many places to put Objects on them. till now, i got the connection between Server and Clien, and i can see which places are free and which of them are occupied.(see pic CYAN:free and Purple: occupied).

My problem is, when i put an object on a free place or take one from an occupied place, it should indicate that automatically on the graphic (Realtime), and the coulour must be changed without recompiling and rerunning the Program.

I would appreciate any Help !
Thx
Attachments
places.jpg
(31.68 KiB) Downloaded 65 times
Untitled - 2.jpg
(41.94 KiB) Downloaded 66 times
hurricane29
New Member
 
Posts: 3
Joined: Mon May 11, 2009 11:09 am

RE: Realtime Problem (School Project)

Postby maschoen » Mon May 11, 2009 3:42 pm

I think you need to give us more information. Are you writing a program? A photon program? What do you mean by the connection between Server and Client? Is the roboter a client that you talk to via TCP/IP? Or do you mean you are writing programs that interact as server and client using message passing? When you say the colour must change without recompiling, do you mean that a user is going to pick his/her the colour? Or did you mean that you just want the program to change the colour for you when something is placed on the Robotor?
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Postby hurricane29 » Mon May 11, 2009 5:45 pm

I got a Server Program, and i had to develop a graphic Client (Photon Program) to communicate with that Server.

* Connection Between Client & Server(IPC): if there is a connection between them, the graphic should be displayed. (The graphic gives Information about which places are free and which are occupied) --> plz see Pic above
These Informations are sent from Robot through a PLC Module via FTP.

*do you mean you are writing programs that interact as server and client using message passing? YES

*I want the program to change the colour when something is placed on the Robotor ( and this without rerunning the programm) this change must happen in Realtime.

Example: The programm must be compiled and runned just one time, and when i put an element on a free place (CYAN Colour in the pic above), at the same time the programm should change the colour of that element to purple (occupied).
hurricane29
New Member
 
Posts: 3
Joined: Mon May 11, 2009 11:09 am

Postby mario » Mon May 11, 2009 6:35 pm

Have your program check for the file transfer via ftp at regular interval. Read the file and parse it. Depending on the content of the file set the color of the object as needed.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby hurricane29 » Mon May 11, 2009 7:30 pm

Thx mario.
this is not the problem, this part is working well. i can read all the Information from the FTP, and the setting of the colour is working too.
the problem is how to program a realtime change of that colour when a free place become occupied .
hurricane29
New Member
 
Posts: 3
Joined: Mon May 11, 2009 11:09 am

Postby mario » Mon May 11, 2009 9:05 pm

I'm sorry but I don't understand what the problem is, you can read the file and get the information from it, you can change the color. What it is that you can't do and how is it related to QNX6.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby micro » Tue May 12, 2009 4:43 pm

via FTP is no RealTime. You can poll the File itself quite often, but changes in your client will just appear as soon, the connection was opened, the file was read and parsed, your client has set the corresponding resources.

The longest on this list will be the polling/opening/closing of the connection/file. Why not having a persistant connection to your server via TCP/IP or just sending quick Datagrams with status changes.

If you wonder the file not changing at all as soon as you open it, you will have to redownload and reopen it... (reload...)
micro
Senior Member
 
Posts: 458
Joined: Thu Jul 22, 2004 8:41 pm

Postby Thunderblade » Mon May 18, 2009 1:07 pm

Is your question related to how to set colors of widgets in Photon? Have you tried PtSetResource ?
Thunderblade
Senior Member
 
Posts: 487
Joined: Thu Apr 07, 2005 11:52 am


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron