
boyracer38
-
Posts
20 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by boyracer38
-
-
Im sending strings via serial between two vi's on separate PCs.
The string is made and broken down from and into property nodes(.value). I was wondering if local variables are any quicker?
Or is there any difference at all?
Thanks
Jason
-
Manfred,
Thanks. That exactly what i was after.
Regards
Jason
-
I'm sending data between two VI's on separate machines via serial read/write.
Some times, the VI will read garbage data, sending it loopy.
Is there any way of flushing the buffer, to clear it before sending data?
Or is there a better way of dealing with this?
I have to use serial comms as its part of a assignment for university.
Thanks
Jason
-
Thanks for all your replies, i now realise what a stupid question it was, but at the time, i was really stuck hehe.
Thanks again
Jason
-
I have the following controls
Silder - accelerator
Gauge - Miles Per Hour (MPH)
Gauge - Revs per minute (RPM)
The idea to make the vi simulate a car....
When the accelerator is increased, the revs will rise.
The RPM will determine the gear (4 speed auto gear box)
So as the rpm rises/falls, the gear will shift and down accordingly....
Thats the part i have done...
I now want to link the revs to the MPH to show the speed...
The speed will depend on the RPM and the gear....
Each gear has a max possible speed which can be reached in that gear.
eg, no faster than 30MPH in 1st
My idea is that i shoudl mulitply the present RPM by a value to get MPH which will be displayed on the MPH gauge?
Any ideas welcome
-
Is a sequence structure the best to ensure a serial read/write between two pc's does not get mixed up?
PC1 will send to PC 2
PC2 does something with the data and sends back to PC1
so
PC1 PC2
Write --> Read
Read <-- Write
Do i need ad a delay anywhere in the loops to ensure synchronisation??
or am i going down the wrong track al together??
Also, as part of the read, i have a concenate string function. It only write to the serial when the string is complete. Once its complete, the string is written to serial port and then i want to move onto the next sequence in the structure.
How to terminate a while loop when the string is written??
Regards
Jason
-
Im trying to change the colour of an led, depending on the number selected from a dial.
I'm using a case structure, with a property node linked to the LED, with the property BoolText.FGColor.
This should change the forecolor of the LED?
If i feed the property node a number representing a colour eg RRGGBB. On running the VI, an error is thrown.
I think its due to the way im trying to specify the colour. 'HELP' says it should be hexadecimal...
how do i do this?
-
Thanks for your comments. I used scan from string in the end. Its worked a treat.
Regards
Jason
-
Hi, as title.... how do i make an LED blink on and off??
Thanks
-
I have a string which i want to split and feed into local variable. The string needs to be split into several parts.
I basically need something which is opposite to the concatenate function....
I have tried 'slit string, but this only splits a string in 2...
Thanks
Jason
-
That really helps thanks!!!!
:thumbup:
Thanks
Jason
-
In conjuction with the lever mentiond on my previous post:
The harder the accelerator is pressed, the faster the car accelerates. This will be illustrated with a Tachometer (RPM). When the accelerator is released, the car will decelerate.
So a ramp up/down function is needed??
:headbang:
-
Is there a way to make a slider control return to the default position when released?
The aim is to have a control which acts like the accelerator of a car.
When released, it will spring back to 0.
Thanks
Jason
-
This might be real simple...
I want to connect an LED indicator to show the status of a boolean switch.
eg. When the switch is on the LED will light, when the switch is switched to off, the LED will go out.
Do i need to use a select comparison?
Any help for a n00b much appreciated
Jason
-
hey xseadog
thanks for the idea - will try it out
i'd read one byte at a time because before i tried to just do a 'serial port read' without a 'bytes at serial port' and sometimes the string was getting read in a funny order :thumbdown:
so, to add a delay, would i put that in the sequence that does the read?
also, I want to add something so that it writes back to the other machine as well. As i want to read string from serial port, do stuff with it and alter settings on front panel accordingly then write back the change of settings and other things. Fundamentally, both machines will need to read and write - duplex communication over serial. Do i just add another sequence below this so that they run in unison?
sorry to ask so many questions - got a big assignment and this is a small foundation of it, without which I cannot progress
many many thanks
PS I am not actually 'boyracer38' - he is my housemate, I did register as bUrGe and Michael Burgess, neither of which I received an activation e-mail for
cheers,
Mike
-
thanks Jimmy
using a shift register i've managed to extract the read string from the start and stop bits
does this look like the best way to do this?
one of my lecturers suggested the use of a local variable, but i'm not grasping how to do this and achieve the same results.
Many thanks
-
Hi all,
currently stuck on the following
I am doing a labview assingnment that entails duplex serial port communication between 2 VIs. So I write a string to the com port on one machine/vi, then on the other read the stream one byte at a time (i've included start and stop bits for the packet) - so the other machine reads a start bit, then loops round and reads each byte at a time from the stream until it hits the stop bit and then this is where the problem starts
with auto indexing on, the while loop then chucks out an array of all the bytes that have been read
how would I go about turning this array into a string? As i need to do string manipulation etc on it?
hope someone can help
many thanks
-
I sorted it myself in the end. :thumbup:
I used a for loop and a 'pick line' function to read each individual line at a time from the
file.
Sweet
Its really simple now, but i didnt know about the 'pick line' function lol.
Does anyone know of a different solution, without using pick line??
Thanks
-
I want to read data from a text file. The text file consists of data set out in lines, as below:
Sat 23/10/2004 The coordinates (64.822, 1.770) were recorded at 23/10/2004 21:25:48
I'm then using a scan from string function in order to extract the coordinate pairs 64.822, 1.770 into an array...
The read from file works fine, its gettin the data into the array which is causin problems. It should read the coordinates from each line, extracting the cordinates to an array.
I can get the scan from string to add the coordinates from the 1st line of the file into the array, but it doesnt seem to be moving onto the next line of the file?
I'm quite new to this lab view thing.
ANy help?
Regards
LED Indicating Switch Position
in LabVIEW General
Posted
Thanks, ive recently finished the project i was working on. It was my first time using Labview.
I produced a Car 'drive by wire' simulator, using serial communications between 2 computers, controls and dashboard on one, the engine, ecu etc on the other.
Worked quite well. Was a steep learning curve, starting with the LED problem, lol.
Thanks
Jason