Jump to content

boyracer38

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Posts posted by boyracer38

  1. It's really okay, we all start off at some point.  Although it looks like you moving fairly well as of late.

    3567[/snapback]

    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

  2. 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

  3. 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

    post-892-1101994094.jpg?width=400

  4. 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

  5. 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?

  6. 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 :blink:

  7. 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

  8. I think you have several ways to do this.....Array to String.

    1)Use Array "To Spreadsheet String Functions"(Functions>>String>>Array To Spreadsheet String).

    2)Use For loop and Shift Register. See attach image.

    post-705-1099452776.png?width=400

    Hope this can help you.

    2535[/snapback]

    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

    post-892-1099490358.jpg?width=400

  9. 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

  10. 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

  11. 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

    :wacko:

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.