MEASURING FORCE ON BALANCE USING AN ELECTRONIC BALANCE FROM THE SERIAL PORT

Hi,
I am trying to measure FORCE using an electronic BALANCE from the serial port. My measurements are strange! The BALANCE sometimes give ZERO reading! Is it because of the sample rate, baud rate etc? I have attached the readings concerned.
Attachments:
databalance.doc ‏144 KB

I think your problem is due to the way you read the weight :
1/ask the balance to send the data
2/oversee the byte number on the serial port until it is constant
3/read the bytes received
4/convert to number
During step 2, you compare the bytes at serial port with the previous value. So far, you have been very lucky to be able to read something : the answer here is always ZERO since the readings occur BEFORE the balance has been able to send anything! means that your loop stops immediately (if you are not convinced, jujst add an indicator to display the loop index. However, since you added a wait (0.8 s), when going to step 3, the balance has had some time to send something. Here, you should not have read again the number of bytes at serial port, but that unwillingly corrects the previous error and you can read most of the received data...
You should modify completely your algorithm. Usually, a balance send the weight as a string with some terminator (RC or LF). Accordingly, the algorithm should be :
1/ask the balance to send the data
2/read the serial port, concatenating the received chars until a terminator char is received or a timeout has occured
3/convert to number
CC
Chilly Charly    (aka CC)
         E-List Master - Kudos glutton - Press the yellow button on the left...        

Similar Messages

  • How can an image be displayed by using raw data read from the serial port?

    Hi there,
    I am using an embedded camera to take photos. To operate it i send commands to it via the serial interface. I have received all of the image data back through the serial port and can view it as hex data in a string. The image data is 16bit colour RAW data at 160x120 resolution meaning i have 38400 bytes of data (160x120 = 19200. 19200*16 = 307200. 307200/8 = 38400). I want to be able to display this data as a picture, but cannot figure out how to do it. Can someone please point me in the right direction? i have been fiddling about with lots of the pixmap functions but no luck. Do i need to put this data in to a 2D array first?

    Yes, first convert it into a 2D array of pixel values. From there you can convert it into an image to display it in a picture control.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to read and write from the serial port using java

    can anyone tel me how to capture data from a serial port and display on the screen and also store it in a database.

    Java Comm API, JDBC

  • Using a PS/2 keyboard on a Sparc workstation through the serial port

    We have recently migrated an application that used to run on a PC, to now run on a Sparc Workstation. This is a SunBlade 1500, running Solaris 8. The application is running in a dedicated console which has a fitted keyboard and trackerball that have PS/2 connectors and cannot be changed.
    We need a way of connecting the PS/2 keyboards to the serial ports of the Sparc workstation. We already have a piece of software that will read ascii values from the serial port so we definately want to go through the serial ports.
    Can someone please suggest what converters will be required to get the output of the keyboard and trackerball as ascii input to the serial port.

    Actually, that's not a bit perverse, at all.
    Jonathan's suggestion is a standard method of connecting to a server.
    (null cable between the computer serial ports)
    ... see the Solaris man pages.
    man tip
    TeraTerm and Hyperterminal are customarily used on a PC running some dialect of Windows.
    The 'tip' command is all that's necessary between Solaris systems.
    PS/2 is not a serial connection, but is a keyboard/mouse interface 'invented' by IBM when they offered their XT-class PS/2 line of desktop systems, back in the 1980's.
    I found this next link by using Google:
    http://members.chello.at/theodor.lauppert/computer/ps2/
    The smaller DIN ports were more compact than the AT-class keyboard ports and the mouse moved from a serial port to a dedicated mouse port.
    Serial communication devices are not keyboards, per se,
    and keyboards are not serial communication devices.
    You need other hardware in between to translate what the human being sends, and another computer is a common method to accomplish that translation.
    Having said all that ...
    Since you cannot change the dedicated console hardware,
    I suggest you go to the manufacturer of that console equipment
    and have them suggest some sort of serial-to-serial interface lash-up.

  • How to use the serial port

    hello
    I would like to know if there is other library than comm to use to establish communication with the serial port ..
    can we do this with pure java ,I mean without the need of using any library ???
    if not then what is the best library to use ???
    any examples ??
    I have other question
    when i use the library comm
    I use the public void serialEvent(SerialPortEvent event) to get my data
    but that data comme line by line
    is there a way to get all the data at once ???
    than kyou in advance

    There you go
    http://java.sun.com/products/javacomm/
    Some extra resources
    http://www.google.co.in/search?q=java+access+serial+po
    rt&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.
    mozilla:en-US:officialmaybe I was not clear ,I know the comm lib
    Im already using it
    but am asking if there any other lib that will work for windows
    thank you

  • I want to transfer data through the serial port in the same coding that hyperterminal uses. How can i do it?

    The serial port seems to be working, and labview seems to be sending the data, but the problem is in which format does it send the data, because in hyperterminal i just input the string "JDX" and it sends it to my device, with labview it sends something but my device does not recognize it.

    nobuto wrote:
    > I want to transfer data through the serial port in the same coding
    > that hyperterminal uses. How can i do it?
    >
    > The serial port seems to be working, and labview seems to be sending
    > the data, but the problem is in which format does it send the data,
    > because in hyperterminal i just input the string "JDX" and it sends it
    > to my device, with labview it sends something but my device does not
    > recognize it.
    Hyperterminal adds the carriage return/line feed to the string which is
    generated by the return key to send out the current line. LabVIEW simply
    sends out what you tell it, so try to set the string to "Show \ Display"
    format and add a \r or \n or \r\n to the command you want to send out.
    Assumes of course that you set the right baudr
    ate/bits/parity etc in
    LabVIEW with the VISA property node, when opening the serial port.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How do I use my ipod in the car without it constantly charging?  I have to use a docking cable into the USB port because the 3.5 mm to 3.5mm jack I bought doesn't work on the ipod.

    How do I use my ipod in the car without it constantly charging?  I have to use a docking cable into the USB port because the 3.5mm to 3.5mm jack I bought doesn't work with the ipod (although it does work with an MP3 player).  My ipod is a 5th generation 80GB classic.

    I know this is old - but did you ever get this working. Thinking of getting a 780 ti card and I have an older mac with the mini-displayport too.

  • How can I use the output value from SIMPLE PID to write something to the serial port?

    I am working on my Senior Design Project that requires the use of incoming compressed air, propotional valves, continuous servo motors, and a serial servo motor microcontroller.  I have figured out how to send byte sequences to the microcontroller through LabVIEW using the VISA serial write function.  The motors are attached to the valves to control the flow rate.  I have created my own simple feedback system using a bunch of case structures but I realized that I am basically trying to recreate the wheel (I basically was writing my own PID VI).   I have an older version of LabVIEW (7.0 Express) and theres no way to upgrade or buy the PID toolkit, so I am stuck using the Simple PID VI.  Also, the only way the motor works is sending an array of bytes to tell it to turn on/off, direction, and speed.  Is there any way I can use the Simple PID VI in conjunction with the VISA SERIAL write function, or is there any other way I can communicate with the serial port using this pid vi?  Any information would be appreciated.

    Hi gpatel,
    you know how to communicate to serial port, but you don't know how to send a value from SimplePID to serial port???
    You know how to communicate, but then you don't know how to communicate???
    You should explain this in more detail...
    Edit:
    From you first post you know what values your motor driver is expecting. You know which values the PID.vi is providing. Now all you need is a formula to reshape the values from PID to the motor. It's up to you to make such a formula. Unless you provide any details we cannot give more precise answers...
    Message Edited by GerdW on 02-28-2010 08:35 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Hacked Message: Your Apple ID was just used to download Podcasts from the App Store on a computer or device that had not previously been associated with that Apple ID

    So I just got a message from Apple saying
    "Your Apple ID was just used to download Podcasts from the App Store on a computer or device that had not previously been associated with that Apple ID"
    I am new to Apple products and signed up to the app store about an hour before but have not downloaded any apps yet.
    I also turned on iCloud Drive.
    Neither of these are Podcasts and I do not have any Podcasts on my device.
    The message is a really poor warning, it could for instance list the IP address which would immediately tell me if it was me.
    It could list what type of device it was.
    It could list what Podcast was downloaded.
    But no, just some random message, probably generated by the really bad default iPhone settings that put ease of use before security.
    I have a long complex password that I do not want ot have to change just because Apple generates a stupid message.
    On Google you have a log of all logins and devices, is there something similar with Apple, so I can figure this out?

    Kroll17 wrote:
    I don't know, I thought it was pretty clear
    "was just used to download Podcasts from the App Store"
    it said it was used to download a Podcast from the App Store
    I have not down downloaded any podcasts and there are no podcasts in the podcasts app, of course if Apple were to list the podcast that was downloaded, the IP address and the device it might help one dismiss the message.
    I am running the latest v8.1.1 although how the version of my OS related to a message generated by Apple servers is beyond me, unless my device is not authenticating properly so Apple thinks I am someone else but then as I have not downloaded any Podcasts that would not seem to be the issue.
    It does NOT say you downloaded a podcast. First, podcasts are not downloaded from the App Store; they are downloaded from the iTunes store.
    It's very clear to me; the app named  "Podcasts" was downloaded, not a podcast. "Podcasts" is a app provided by Apple for managing and downloading podcasts.

  • How can I use LabVIEW to send the equivalent of a CTRL D (in VT 100 format) out the serial port of my computer?

    I am trying to write a vi that interfaces with a piece of OEM equipment that is set up to talk with a VT 100 terminal. I can't seem to locate the ASCII equivalent string (if there is such a thing) of a CTRL D. Is there a vi that emulates VT 100 commands?

    If I recall, CTRL-D is EOF on most ASCII tables.
    You'd probably have to use an escape sequence
    or if you can use an unsigned 8-bit that might be
    easier.
    In article <[email protected]>, TLS
    wrote:
    > How can I use LabVIEW to send the equivalent of a CTRL D (in VT 100
    > format) out the serial port of my computer?
    >
    > I am trying to write a vi that interfaces with a piece of OEM
    > equipment that is set up to talk with a VT 100 terminal. I can't seem
    > to locate the ASCII equivalent string (if there is such a thing) of a
    > CTRL D. Is there a vi that emulates VT 100 commands?

  • I want to build an array using the data that I get through the serial port

    I am reading data through the serial port, but I want to buffer these data. I have seen a function, but i think that i can use this if I am reading data from I/O intrument, so I don´t how can I fill an array, with the data that I am reading!!!
    Thank you!!!

    I'll hazard a guess that you are reading data with VISA as a string. Then you want to convert that (probably with Scan From String) into a number. Then, you want to collect those numbers into an array.
    We don't really have enough information to tell you the best way to do this. Here are some ideas.
    If you are reading all the numbers from the instrument at once (e.g., a waveform from a scope), you might consider using "Spreadsheet string to array". Most scopes return the data as ASCII with commas between the values, so you'd wire a "," to the "delimiter" input of the "Spreadsheet string to array" function.
    If, however, the instrument is returning a single point at a time, there are more questions. Do you want to do this continuously, or do you want t
    o collect only a certain number of data points, and then process them as a block?
    If the latter, then you'd just acquire each data point, convert it to a number, and then use output indexing on the for loop to create your array.
    If the former, then you may want to store the data in a queue, and read it from the queue elsewhere in your program.
    If you let us know what you want to do, we can probably provide more precise help.
    Brian

  • Being that I have a Mac Pro, what program I have to use to download movies from the Veehd website?

    Being that I have a Mac Pro cpu, what program I have to use to download movies from the Veehd website?

    If you want to download veehd videos, remember not to download any plugins. I have suffered by its redirecting my homepage many times.  If you want to download the video still, you can refer to the post from which I succeeded at last after using the suggested tools.

  • I have an Iphone 5 and used to download applications from the Apple store but now i couldn't download any thing although it seems that it trying to download and gives " waiting Icon " and nothing happened although there is about 9.4 Gb available space

    I have an Iphone 5 and used to download applications from the Apple store but now i couldn't download any thing although it seems that it trying to download and gives " waiting Icon " and nothing happened although there is about 9.4 Gb available space

    check the attached pics the waiting icon and it stands for long time without downloading any bit

  • Can Airport extreme be used as a repeater from the BT home hub

    can Airport extreme be used as a repeater from the BT home hub because my laptop will be very far away and i currently get a rubbish signal on my Windows pc so when i upgrade to the mac pro i am wonderimg if i could use the airport extreme as a repeater to strenthen my already rubbish signal??

    You might want to check with BT to see if they have a device to do what you want.
    Using wireless only, the AirPort Extreme will only "extend" or "repeat" the wireless signal if it has been produced by another Apple router. It is not compatible with routers from other suppliers for this purpose.

  • HT201272 I am a resident of Ecuador.I used to buy applications from the us apple store with an ecuadorian credit card and my address in Ecuador.

    I am a resident of Ecuador with an ecuadorian credit card.I used to buy applications from the us apple store and updated them whenever  updates were available with no problem at all. Since approximately a month,I am not able to purchase any new applicaton or update the old ones.Apple send me back to the ecauadorian apple store were there are almost no applications and where I can not even update the ones I have.
    How can I solve this problem.? Before I was able too purchase applications anywhere in the world.This is absurd.
    Can anybody help me please?
    Regards,
    Refurioso

    You can't, you will need to be in the US with a US billing address (and credit card issued by a US bank) and iTunes account to be able to buy/download from the US store - the terms of use of the US store say (and other country's stores will be similar) :
    The App and Book Services are available to you only in the United States, its territories, and possessions. You agree not to use or attempt to use the App and Book Services from outside these locations. Apple may use technologies to verify your compliance.
    If there are apps that you want that aren't currently in the Ecuadorian store then you can try requesting that they be added, but ultimately it's the app developers that will have to grant Apple a license to sell them there : http://www.apple.com/feedback/itunes.html

Maybe you are looking for