Click here to Skip to main content
15,891,943 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionOpenNetCf version Pin
ArchaBhandare11-Feb-07 22:14
ArchaBhandare11-Feb-07 22:14 
QuestionRegarding BEST Practices for .net development Pin
Vijay_Madhusudan_Kulkarni11-Feb-07 18:03
Vijay_Madhusudan_Kulkarni11-Feb-07 18:03 
AnswerRe: Regarding BEST Practices for .net development Pin
Kevin McFarlane12-Feb-07 5:24
Kevin McFarlane12-Feb-07 5:24 
Questioncan be done real time simulation with WPF? Pin
Mir_As11-Feb-07 7:41
Mir_As11-Feb-07 7:41 
AnswerRe: can be done real time simulation with WPF? Pin
Dave Kreskowiak11-Feb-07 13:55
mveDave Kreskowiak11-Feb-07 13:55 
AnswerRe: can be done real time simulation with WPF? Pin
Luc Pattyn12-Feb-07 5:53
sitebuilderLuc Pattyn12-Feb-07 5:53 
GeneralRe: can be done real time simulation with WPF? Pin
Mir_As14-Feb-07 22:31
Mir_As14-Feb-07 22:31 
GeneralRe: can be done real time simulation with WPF? Pin
Luc Pattyn15-Feb-07 0:26
sitebuilderLuc Pattyn15-Feb-07 0:26 
Hi,

I am not sure this is simulation.

To me simulation is calculating somethings behavior based on a mathematical model, without
having the actual object in existence, or without having it provide information
(such as measured position, angle, velocity, ...)

What you describe sounds more like visualisation: again you create a mathematical model
but now you let it mimic the observed behavior of the real object, by taking
measurements and feeding these in your model.

Anyway I think you can do this in C# (or another hi-level language) like so:
1. create a form with a Panel (for some reason I prefer drawing into a panel);
in the end you will want that to be a double-buffered panel (NET 2.0 knows about
that, under 1.1 you need to derive from Panel and use SetStyles)
2. create some classes that represent parts of the robot arm (upper arm, under arm,
wrist, hand, ...); let them all inherit from a base class "Part".
3. create the model by instantiating the above classes and keep all those instances
in an ArrayList "myModel".
4. give each part class a Paint() method that paints itself in the Panel, so your
entire drawing could consist of foreach(Part p of myModel) p.Paint();
5. introduce a coordinate system (say xyz)
6. assume all angles are known (from measurements)
7. all parts have known lengths and one has a known position; all the others
can be calculated provided you know the direction; some math is involved here.
8. create a periodic timer (I would suggest a Forms.Timer) that iterates over your
model, so it:
- performs all measurements
- recalculates all positions
- redraws the entire model

Real-time aspects:
- the position calculation and drawing seems rather straightforward, they wont
hamper a smooth display
- the most critical part AFAIK would be performing the measurements and getting them
into the PC. You should try to evaluate the time it will take to do all measurements once
before developing all the code, since that may prove it is not possible to get
enough iterations per second, and/or you have to change your micro-to-PC communication
and/or you have to introduce threads (plus the problem that not all measurements
belong to the same point in time).

BTW: you will have noticed I didnt model any motors, the above just knows
positions/angles and visualizes everything.

Hope this sets you on the right track...





Luc Pattyn

Questioncheckboxlist and javascript Pin
Uma Kameswari11-Feb-07 5:43
Uma Kameswari11-Feb-07 5:43 
AnswerRe: checkboxlist and javascript Pin
anj198312-Feb-07 8:10
anj198312-Feb-07 8:10 
Questiondoes web servise is where i sould use server side chat program? Pin
yuvalda110-Feb-07 5:59
yuvalda110-Feb-07 5:59 
AnswerRe: does web servise is where i sould use server side chat program? Pin
Dave Kreskowiak10-Feb-07 8:22
mveDave Kreskowiak10-Feb-07 8:22 
Questionmultyplayers games using a server client communication Pin
yuvalda110-Feb-07 0:19
yuvalda110-Feb-07 0:19 
QuestionMultiple Versions of .NET Framework Pin
Rajaraman Soundararajan9-Feb-07 18:38
Rajaraman Soundararajan9-Feb-07 18:38 
AnswerRe: Multiple Versions of .NET Framework Pin
Christian Graus9-Feb-07 18:44
protectorChristian Graus9-Feb-07 18:44 
GeneralRe: Multiple Versions of .NET Framework Pin
Rajaraman Soundararajan10-Feb-07 6:02
Rajaraman Soundararajan10-Feb-07 6:02 
GeneralRe: Multiple Versions of .NET Framework Pin
Christian Graus10-Feb-07 10:35
protectorChristian Graus10-Feb-07 10:35 
GeneralRe: Multiple Versions of .NET Framework Pin
Mike Dimmick11-Feb-07 23:37
Mike Dimmick11-Feb-07 23:37 
GeneralRe: Multiple Versions of .NET Framework Pin
Christian Graus13-Feb-07 18:09
protectorChristian Graus13-Feb-07 18:09 
AnswerRe: Multiple Versions of .NET Framework Pin
Mike Dimmick11-Feb-07 23:44
Mike Dimmick11-Feb-07 23:44 
AnswerRe: Please give me some Idea if know about it Pin
Christian Graus9-Feb-07 18:18
protectorChristian Graus9-Feb-07 18:18 
QuestionHow to reorder grid columns Pin
AndrusM9-Feb-07 8:05
AndrusM9-Feb-07 8:05 
AnswerRe: How to reorder grid columns Pin
led mike9-Feb-07 9:28
led mike9-Feb-07 9:28 
QuestionRubi on Rails Pin
supramido9-Feb-07 6:22
supramido9-Feb-07 6:22 
AnswerRe: Rubi on Rails Pin
Dave Kreskowiak9-Feb-07 7:28
mveDave Kreskowiak9-Feb-07 7:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.