12-01-2010 02:53 AM
Hi
Please analyse this example:
Best regards
Barbara
12-01-2010 06:20 AM
Hi,
thanks Been bitten by LabVIEW for the code, but i think that i will stick with the one we came up with Barbara 🙂
Barbara this is something similar that i came with, but i would have these blocks for every LED multiplied by 2 (for X and Y). It would be massive.
I guess i could put it in the SubVI to have a single block but still there would lots of it.
Perhaps i could put it in the 'Formula Node' and make there all the If's statement with two inputs ( X and Y value ) and two outputs ( one for the first case - X, and the other for inner case - Y ). Do you see any problems ?
pauldab
12-01-2010 07:58 AM
Hi
It should work. But why are You using leds, not an array or just an idicator?? One way or another I see no reasons foe it to make a problems.
Still, I can be wrong also :D, then let me know again.
Best regards
Barbara
12-01-2010 09:04 AM
Led's are as i said a nice way to show te current position of the joystick..... **bleep** it i don't understand LabView programming ;d,
what array would change here ? I want to put it in the case structure because i would like to turn led on and send the value thorugh serial port.
Ok i'll try to do it with the formula node and two case structures today, and post what i came up with 😉
thanks Barbara again:)
pauldab
12-02-2010 11:58 AM
Hi,
the program works fine 🙂
i have only tested it two LED's - will have to put there all the LED's , and also commands to be sent over serial port.
Barbara i assume that i can put other while loops in our program for keyboard ? They would be executed parallel to the keyboard sending chars thorugh serial port ? For example when i would want to receive images from the camera using Vision Module ?
I will also put there this while loop for the joystick. Would it be wise to put last program with keyboard and this one into a case structure to give the ability to choose what steering do i want?
Any suggestions with the joy_final.vi ?
regards
pauldab
12-09-2010 05:25 AM
Hi
Of course You can put while loops into the program, but You still have to consider few things, like race condition, synchronization, timing. While You are working on Windows You have to be aware of its limitations (It would go trully parallel only on FPGA, but I don't thing You ne ed this).
And a case structure is always fine for choosing an options (You may also use events, as You prefer).
I think it should work fine.
regards
Barbara
01-29-2011 04:43 AM
Hi,
this is what i came up with so far:
robot without cRIO: http://www.youtube.com/watch?v=h6O2ibLSpRI
robot with cRIO: http://www.youtube.com/watch?v=6uPv4coNOaA
the application for my laptop is "aplikacja_sterujaca"
the app for cRIO is "aplikacja_cRIO"
I have couple of problems.
1) Without the loop sending letter 'p' at the bottom every 10s (cRIO app),
my serial port on cRIO won't start (i can't control the robot and don't get anything on serial port ).
2) When i connect to compacRIO with application on laptop it works - but when i stop it i can't reconnect and control the robot
again - i need to restart the cRIO. Is there any solution ?
3) i didn't get the chance to checkt it, but will the last loop receive anything from compactRIO - shouldn't be TCP Read in the loop somehow ?
4) Would it be hard to add a program to receive a data on compacRIO serial port from a special sensor ( it doesn't matter what sensor but it gives 15 bytes of data every 50ms - 20Hz frequency [9600 baud, no parity, 1 stopbit] ). Send it over TCP to the PC, and after that send through PC serial port with the same frequency and parametres?
thanks for any help
pauldab
02-02-2011 10:18 AM
Welcome back - Nice work with robot
As I presume, You have Real Time On cRIO
Let's go one after another.
1. Strange behaviour - Try to see when it blocks itself with highlight execution. Try to make simple communication through serial port and see, weather You'll get the same. Add step by step the other parts to verify, what is the problem.
2. As You can see on Your project, third loop does not stop ever, so probably it just runs in circuit constantly. Be carefull with timing - no timing in Real Time means full speed and no time for any other action.
3. Not quite understand. You have TCP Read and send a message to consumer loop - seams right.
4. Should be possible - the only way to say is to try.
Good luck and update Your status on forum
Best regards
Barbara
02-02-2011 10:18 AM
Welcome back - Nice work with robot
As I presume, You have Real Time On cRIO
Let's go one after another.
1. Strange behaviour - Try to see when it blocks itself with highlight execution. Try to make simple communication through serial port and see, weather You'll get the same. Add step by step the other parts to verify, what is the problem.
2. As You can see on Your project, third loop does not stop ever, so probably it just runs in circuit constantly. Be carefull with timing - no timing in Real Time means full speed and no time for any other action.
3. Not quite understand. You have TCP Read and send a message to consumer loop - seams right.
4. Should be possible - the only way to say is to try.
Good luck and update Your status on forum
Best regards
Barbara
02-02-2011 03:56 PM
Hi,
thanks, the electronics took me quite a while.
compactRIO gives great possibilites, but i really don't like this graphic programming.... 😛
don't know when will everything happen.....
1. If i put a simple program just to open and send data through com port, it works fine , when i put all this messy program for tcp.... there are problems 🙂
2. In aplikacja_sterujaca i want to receive some data from compactRIO and to send them thourgh different serial port on my PC, didn't know how to do it, but the problem with the fact that i can't reconnect my compactRIO after closing aplikacja_sterujaca was also without that loop (have to restart cRIO : / ).
3. I was thinking about reading a data not on cRIO , but on PC - receiving the data from compactRIO - i was reffering to aplikacja_sterujaca and to the third loop we disscussed earlier.
4. yea that's why i don't like LabView, how to make a basic frame, how to make something time critical ?;/
P.S. Barbara the aplikacja_sterujaca is just your program that you had written earlier 🙂 i just simply repleaced VISA Write with the TCP Write 😉
pauldab