Reading Weight from Weigh Bridge....

Hi.
The scenario here is that we have to create module pool for picking up
the weights of trucks from weigh bridge ( AVERY brand ).
The existing system is in foxpro . Please find attached the text of AVERY guidance which exhaustively shows how the fox system is reading the
weight from the port, to which the weigh bridge is attached, on the
system kept at the location.
I wish to have the info regarding how, this functionality can be
achieved in ABAP as my perception is that this is not a simple
execution / run of an external program.
regards,
Suman
TEXT
getwt.prg
sample weight recieving program for Avery CTH
this is demo program for getting weight from the CTH
using the CALL and LOAD commands of dBASE III PLUS only.
This demo program demonstrates the use of LOAD and CALL commands
of dBASE III PLUS to get the weight from the CTH. The actual
program to get the weight is a file called GETCTH.BIN
To use GETCTH.BIN directly do the following:
   1. Start dBASE III PLUS normally.
   2. Type the command - LOAD GETCTH at the dot prompt of dBASE III PLUS.
      (Be sure to give the correct drive and/or directory where the
       file GETCTH.BIN resides in your computer system).
   3. The program GETCTH.BIN will return the weight in a variable
      passed from dBASE III PLUS, so first initialize a variable in
      dBASE III PLUS to recieve the weight.
      The weight string returned by the CTH is 26 charecters long so
      define a variable of length 26 by typing the following command
      at the dot prompt:
      WEIGHT = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"   { Any dummy value }
                            or
      WEIGHT = "2BCDEFGHIJKLMNOPQRSTUVWXYZ"   for COM2 port
      ( Note -> The choice for the name of the above variable is
                purely arbitrary. Any name could have been chosen)
   4. Next type the following command at the dot prompt to call the
      GETCTH function :
      CALL GETCTH WITH WEIGHT
   5. After some time the dot prompt will return. At the dot prompt
      type the following :
      ? WEIGHT
      If the GETCTH function has been successfull in getting the weight
      from the CTH then this function will return the weight as a string
      of 26 charecters containing the weight and other information.
      Otherwise, if the function is not successfull then the value of
      the variable passed will be set to 26 spaces. The major reason
      for the failure of the function will be a timeout error i.e.
      the CTH did not respond after a preset time interval had elasped.
      The returning of 26 spaces makes it easy for a dBASE III PLUS
      program to retry the weighing operation if failure is detected.
      The use of this in a loop till the function succeeds in getting
      a weight is illustrated below in the program.
      The weight returned by the CTH consists of a string of 26 charecters
      A sample weight that could be returned is reproduced below:
      ABCDEFGHIJKLMNOPQRSTUVWXYZ
        19600 kg    G 000016 O
      The following is the sequence of charecters :
      1. The first two charecters ( positions A - B above ) are
         space charecters.
      2. The next five charecters ( positions C - G above ) is the
         weight from the CTH - ( 19600 in this case).
      3. The next charecter ( position H above ) is a space charecter.
      4. The next two charecters ( positions I - J above ) are the weight
         units - ( kg in this case ).
      5. The next four charecters ( positions K - N above ) are space
         space charecters.
      6. The next charecter ( position O above ) specifies mode of
         operation. It shows 'G' for Gross mode and 'T' for Tare
         mode of operation.
      7. The next charecter ( position P above ) is a space charecter.
      8. The next six charecters ( positions Q - V above ) is the
         consecutive number which is unique for each weighing.
      9. The next charecter ( position W above ) is a space charecter.
     10. The next charecter ( position X above ) is the machine ID number.
     11. The last two charecters ( positions Y - Z above ) are
         Carriage return and Line feed charecters.
Clear the screen and show the copyright notice.
clear
@  0,  0  TO 23, 79    DOUBLE
@  3,  1  TO  3, 78
@ 11, 25  TO 18, 57
set color to w/n+
@  1, 26  SAY "A V E R Y     I N D I A   L I M I T E D"
set color to
set color to n/w+
@  2, 10  SAY " Demo program for getting weight from Avery weight digitiser - CTH "
set color to
set color to w/n+
@  6,  3  SAY "(C) Avery India Ltd.- 1989,1990  All rights reserved."
@  8, 10  SAY "The source code of this program is for pure demo purposes and all"
@  9, 10  SAY "copyright  of   this    demo  program  and  its source rests with"
@ 10, 10  SAY "Avery India Ltd."
@ 20, 10  SAY "This program and its  accompaining  source  code cannot  be  used"
@ 21, 10  SAY "without the prior permission of Avery India Ltd."
set color to
set color to n/w+
@ 17,26 say " Press any key to continue...  "
set color to
wait ""
@ 4,0 clear to 23,79
@ 0,0 to 19,79 double
WEIGHT = space(26)                && define a variable to get the weight
load getcth                       && load the module from disk
                                  && this assumes that the file GETCTH.BIN
                                  && is in the current drive/directory.
                                  && If not, use drive specifier.
do while weight = space(26)       && the main loop
   call getcth with weight
enddo
set color to w/n+
As explained above the last two charecters of the weight string
are the Carriage return (CR) and the Line feed (LF) charecters
out of the total of 26 charecters of the weight string. So to get
the whole weight string other than these last two chareceters we
can use the SUBSTR command of dBASE III PLUS as follows :-
  @ 14,20 say "The weight is : " + substr(weight,1,24)
This will show the whole weight string on the screen i.e. all
24 charecters ( it will not show the CR and the LF charecters ).
The CR and the LF charecters are as it is unprintable charecters
and will show up as control charecters if printed on the screen.
If the whole weight string is not required and only, say, the
weight and the weight units are required, then the following command
could be used :-
@ 14,20 say "The weight is : " + substr(weight,1,10)
This will show the weight value and the weight units (this substring
will include the embedded space charecters in this susbtring).
Similarly, other parameters from the weight string could be
incorporated, if required, from the whole string to enhance
the weighing process on the computer.
The idea of putting the CALL statement above in a loop is that
sometimes due to unavoidable reasons, there may some garbage
charecters on the serial port. Thus it may be necessary to flush these
charecters from the port by CALLing the function again.
Sometimes, the function may return without a timeout error but the
variable may contain some control charecters which do not make sense.
In this case the function should called repeatedly till the proper
charecters are returned. This occurs due to the reason explained
above.
@ 14,20 say "The weight is : " + substr(weight,1,24)
set color to
set color to n/w+
@ 16,5 say "Please read the README.DOC file on this disk for more information"
release module getcth             && release module from memory
set color to
Please refer to the dBASE III PLUS manuals for a
complete discussion on the LOAD, CALL and RELEASE
commands.
Message was edited by: Suman Tyagi

Thanks, but I've already seen this thread and done the steps described on it.
Actually, my question is very specific... How to populate the fields LinkVal and LinkUnit of the registry...
I read all the threads here in SDN and they don't answer my question...
I'd be glad if someone had already done tcode HUPAST works for Filizola...
Tks again.

Similar Messages

  • We want to read data from weigh bridge and display in oracle forms & store

    Sir/Madam,
    in our organisation we had one requirement. i.e is reading data from weigh bridge using serial port, displying that data in oracle forms and when ever user click save button we store that into my oracle database. we are using oracle 8i and forms 6i and windows OS environment. we don't know reading data from serial port and placing that into form items. please help me as early as possible if there is any property available in d2k regarding this requirement .
    thank you,
    vishnu

    There's no property in Forms that makes you read serial ports, but as far as I know you need to know the API of the machine which you want to read data from (it should come with machine's manual) and then it will be easy to store it in forms item.
    Tony

  • How can I read weight from scale

    Hi,
      I want to setup SAP so that HUPAST transaction can read the weight from the scale. I could see that it looks for an RFC destination and scale name etc. But didnt succeed in creating the RFC destination
    Please let me know if a third party software is a MUST or SAP has an inbuilt software for reading scales, if so how can we configure it. We are on ECC 5.0
    Thanks for reading.

    After a few more experiments, you can get correct values from the 'bounds'-descriptor.
    function getTextExtents(text_item) {
      app.activeDocument.activeLayer = text_item.parent
      var ref = new ActionReference()
      ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") )
      var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID('textKey'))
      var bounds = desc.getObjectValue(stringIDToTypeID('bounds'))
      var width = bounds.getUnitDoubleValue (stringIDToTypeID('right'))
      var height = bounds.getUnitDoubleValue (stringIDToTypeID('bottom'))
      var x_scale = 1
      var y_scale = 1
      if (desc.hasKey(stringIDToTypeID('transform'))) { 
      var transform = desc.getObjectValue(stringIDToTypeID('transform'))
      x_scale = transform.getUnitDoubleValue (stringIDToTypeID('xx'))
      y_scale = transform.getUnitDoubleValue (stringIDToTypeID('yy'))
      return { x:Math.round(text_item.position[0]), y:Math.round(text_item.position[1]) , width:Math.round(width*x_scale), height:Math.round(height*y_scale) }
    I tested that this returns correct values both when image and text box get scaled. There is some strange Photoshop behaviour to note though:
    bounds.left seems to be always 0 like one could assume
    bounds.top on the other had is most times -1-3px. This probably corresponds to the amount the actual text rises above the text box. I feel it's a bug, i.e. it should be part of content bounding box, not the text area. But maybe it's like it was specced and I'm just interpreting it wrong.
    x_scale and y_scale seem to be always equal. For example if you create a 100x100px text box and scale it to 200px horizontally, both x_scale and y_scale will be 2 and text_item.height will be 50.

  • HUPAST - Reading weight from scale

    Hello everyone,
    I've found some threads explaining how to get the weight from transaction HUPAST.
    We've already done almost all the configs related.
    I've a specific doubt regarding the registry parameters LinkUnit and LinkVal.
    When I execute HUPAST, I receive error on the values entered on these fields.
    I'm trying to connect to PcScale from Filizola. If someone has already done this configurations, please let me know...
    Tks in advance.
    Flavio

    Thanks, but I've already seen this thread and done the steps described on it.
    Actually, my question is very specific... How to populate the fields LinkVal and LinkUnit of the registry...
    I read all the threads here in SDN and they don't answer my question...
    I'd be glad if someone had already done tcode HUPAST works for Filizola...
    Tks again.

  • Problem reading weight from my Ohaus Pro scout balance. Model SP2001

    Good evening.
    I am trying to read a single measurement from a Ohaus Balance (model SP2001). The connection seems to be good, but when I send a print command : P\r, it always reads 0 grams, no matter what I put on the balance. Now the display on the balance shows the correct weight, its what is read on labview that is always Zero.
    Also, when I send the command for Mode: 0M\r ,  to get it in gram mode, the command needs to be sent in normal codes display in order for the VISA write not to bug, but when I send the print command: P\r, it only gives no error when it is in \ codes display, I dont get it.
    I have attached the code I'm using here, wich is pretty much inspired by the SP2001 driver that I found on NI hopefully someone knows how to work with this.
    Attachments:
    Ohaus_measure_test_2014_07_18.vi ‏36 KB

    Ok so I wrote \r on here but as you can see in the code, I actually send a string carriage return with the command when setting up the mode
    When I say to bug: it gives me and error stating that timeout expired.
    Nothing is wrong specifically wrong with the driver, it gives me the exact same problem, the code I'm using now is basically all there is in the driver put in one stacked sequence

  • Capture Weigh Bridge Reading in ABAP Program through RS232 port

    Dear SAPers,
    I am in Cement Implementation Project and i have requirement to Connect Weigh Bridge to SAP ERP and capture the readings of that Weigh Bridge in ABAP program.
    How can i capture those readings in ABAP program or save them in a Z table using RS232 port????
    Best Regards,
    Kholoud
    Moderator message: please do not cross-post.
    Edited by: Thomas Zloch on Mar 17, 2011 1:22 PM

    Dear Vijay,
    I'm having the same problem in my implementation, the client needs me to capture the readings from Weigh Bridge through RS232 port directly to ABAP program.
    Could please tell me how did you solve this??
    Thanks
    Kholoud

  • Barcode / Weight from RS232 Cable interface

    We are in the process of developing a solution in WDA which is  very tightly integrated with standard SAP.
    For most of the inputs, my client uses barcode readers attached to the PC and also for some of the operations we are suppose to get the weights from Weigh Scales directly without human intervention except for click of a button.
    My queries, will WDA support these features, as it does it in standard Dynpro, Is there any specific coding beside the interface for weigh scale is required.
    Regards
    Rohit Chowdhary

    Hi Rohit,
    as far as i know,but i'm really not sure in this case,there are only WD BarCode Reader API's available for Web Dynpro Java.
    http://help.sap.com/saphelp_nw04/helpdata/de/6b/cdf740c42f8566e10000000a1550b0/frameset.htm
    These and also the RFID API's are part or the mobile Add on libary and WDA isn't supported fr mobile devices up to now.
    But you have a possiblility to use a virtual keystroke(simulating a keyboaurd during the scan) if your barcode vendor shippes a PC software for that. The value is then transfered into the focused WDA Input Field as if it is typed manually. For that have a look into this thread:
    https://forums.sdn.sap.com/click.jspa?searchID=2078804&messageID=2963928
    Regards
    Frank

  • Reading Data from serial (Comm) Port in developer200 forms 6i

    Dears,
    I have developed an application using Dev2k forms 6i.
    I need to read data from a device (weigh bridge) that is attached to PC on comm port.
    scenario: when a vehicle comes on the Weigh bridge it calculates its weight and send it to the PC on serial port.
    on when-button-pressed event I want to get data into a text field on form.
    If any one has developed such form please help me.
    Thanks and regards

    you can:
    create java class -> wrap plsql -> invoke plsql-code from button trigger
    googling java class instead of creating =)

  • Reading data from RS232 PORT

    Hi all
    I have to capture the   WEIGHT from the RS 232 PORT into SAP.
    How to interface the Weigh Bridge System with ABAP thru RS232 PORT.
    Thanks in advance
    Sourabh

    I have the same requirement, but have many different RS-232 devices to read from via serial ports. I would be interested in any solutions that anyone has come up with.
    Thanks,
    Bob

  • Can we link GR [Receipt Quantity field] to weighing bridge to compy the Wt.

    Dear Experts,
    I have the requirement In Goods Receipt -
    Material Quantity is to be copied Automatically at Good receipt quantity field from the weighing bridge digital meter.
    Is it possible to link
    if it is possible, please explain how to link?
    which tools we have to use in SAP?
    please brief me on the my requirement.
    Thanks in Advance

    Hi,
    It is possible to link.
    SAP has a command program that is setup and linked with the weigh bridge application.
    The program pushes data to R/3.

  • Connection Microsoft Dynamics Nav to a weigh bridge machine

    I want to read data from a digital weigh bridge from Navision anyone out there with a solution.

    You can use web-services in NAV for it. If you need details, try on Dynamics Community forum: https://community.dynamics.com/nav/f/34.aspx

  • How do I find images in LR 2.4 (imported from CS4 Bridge) that have color labels already assigned In CS4 Bridge? I have set both Bridge and LR color labels text to match (eg Green for green, etc).

    How do you find images in LR 2.4 that have been imported from CS4 Bridge and have been assigned a color label in Bridge?  I have set both LR 2.4 and my CS4 Bridge to match the text for each color to be the same (eg. Green for green, etc), and the filter search in LR 2.4 shows that a label has been assigned, but I am unable to identify and locate the specific images in LR 2.4 that have had a color label assigned from CS4 Bridge.  I have tried to search via attribute, metadata, text, etc...Is it necessary to re-assign color labels all over again, image by image, in LR 2.4, or is there a way to automatically have the color labels assigned in CS4 Bridge be assigned and searchable to the images after they have been imported into the LR 2.4 catalogue from the Bridge program?

    JohnM.
    I closed both programs and re-imported photos and re-tried the action of having LR  read the XMP metadata from the CS4 files, and it seems to work now just fine...don't know why now and not before, but thanks much. Is there a way to have LR do this automatically upon import of images from CS4?  I tried to do this with an import metadata preset, but no luck.  It seems as if I can only do this once the images have already been imported into LR, and then to have to have LR read the metadata from the CS4 Bridge files.  thanks gain.

  • Syncing photos from Adobe Bridge?

    I have hunted across the web and haven't even found a page that discusses the question, let alone answers it:
    Is it possible to sync photos TO an iPod from Adobe Bridge?
    I suspect the answer is no (or at least, not directly).
    Ideally, what I would like to do is "sync selected collections" to my iPod, including both ordinary collections and smart collections.
    (If you're not familiar with Adobe Bridge—it's a file browser/organizer that, unlike iPhoto, views the actual native folder structure on the computer, rather than having its own database separate from the file structure.  Ordinarily you use Bridge to look at photos—or video files or whatever—directly in their containing folders.  However, if you want, you can create collections or smart collections.  These are exactly analogous to iPhoto's albums and smart albums, so I won't waste time describing them in detail.)
    Since I suspect there is no way set up within iTunes or iOS to sync from Bridge's collections, I am looking for workarounds that will allow me to do this.
    The collections, incidentally, are really just XML documents containing a list of file names (including the full path for each file).  Smart collections are XML lists of criteria.
    I have monkeyed around with aliases and symbolic links coupled with the iTunes "sync photos from folder..." dialogue, and it appears that only hard links will work—not symbolic links to files, not symlinks to directories and certainly not aliases.
    What's needed, then (and I believe this is the only way to accomplish my objective without doubling the hard disk space taken up) is a script/droplet/workflow/whatever that will take the collections from Bridge and create hardlinks for all photos from all collections, in a new directory (with the descriptive title "iPod syncing photos folder with hardlinks of collections' photos"—or maybe something shorter, heh heh.)
    Can anyone scripting savvy point me in the direction of how I might accomplish this?

    The solution I finally came up with involves hard links, and two separate automator workflows.  I posted about it in detail here: http://forums.xkcd.com/viewtopic.php?f=20&t=103600
    Hope this helps someone else.

  • Greetings from a Photoshop Newbie. I need a computer, preferably a Mac laptop, with some serious processing power. I take photos with a Pentax 645Z; files are 50MB raw. I upload from Adobe Bridge and manipulate the photo, sometimes turning them into files

    Greetings from a Photoshop Newbie. I need a computer, preferably a Mac laptop, with some serious processing power. I take photos with a Pentax 645Z; files are 50MB raw. I upload from Adobe Bridge and manipulate the photo, sometimes turning them into files in excess of 250MB. I cannot resize as the large files are needed for enlargements. Have all sorts of problems trying to manipulate, add effects and saving most large files. I need some serious processing power. Can anyone suggest what Mac i should purchase? I thank you in advance for your help :-)

    It sounds as if you're having some system-related problems now, unrelated to processing power as such. In particular, a buggy video driver can cause everything to slow to a crawl.
    Medium format files are big, true, but not so big as to cause significant slowdowns on a normally functioning and reasonably current computer. A laptop will always be slower than a well-equipped desktop system, though. Mac vs PC plays no part in this, performance is unrelated to platform.
    Bottlenecks are different in ACR and Photoshop, so that should give you a clue. ACR is computing-intensive and mostly limited by CPU speed. Photoshop, however, is mostly bandwidth-intensive and mainly limited by memory and disk throughput. It's also sensitive to GPU issues.

  • Moving from Adobe Bridge CS5 to Aperture 3

    So I have been using Bridge since CS right through to CS5 for all my organising needs but I want something that is a little more organised in terms of photography requirements as my collection is getting larger and in need of higher organisation. I like the look of the workflow in Aperture 3. My only problem is that I would like to import the CRW raw files produced by my Canon SLR with the XMP sidecar files that contain all the adjustmenst to the image. There is no obvious way to do this in Aperture 3, is it possible? I have imported several collections and none of them have the adjustments applied to them in Aperture
    Any help would really be appreciated.
    Thanks

    Unfortunately, it is not possible to utilize your ACR edits listed in the XMP file if you move to Aperture.
    Basically, the issue is with the different companies design of RAW rendering which do not read each other's edits.
    There is some support for DNG, but I would not recommend this path as there are a number of threads where users have had poor results. Apple's support for the format seems more like a stop-gap for users who purchase new cameras and may need to wait for the Camera RAW compatibility updates to be released for OS X before Aperture can recognize and render the RAW files.
    I also moved to Aperture from a Bridge/ACR/Photoshop workflow and decided to simply backup my former work to an archive drive and then render all the images to JPEG for importing into Aperture. Since I am happy with the work I completed in the Adobe workflow, the JPEG renders fulfill my needs and Aperture allows enough tweaking of the images without degradation for future use.
    All new images are of course either RAW or JPEG images imported directly into Aperture and I run a Managed library with all images inside the Aperture library package.
    One other option you have (and that I thought about as well) is to keep the images in Finder folders and run a Referenced library where both Aperture and Bridge can access the files, but I personally saw no real benefit as Aperture offers the organization of Bridge and the non-destructive editing of ACR with a much nicer interface - IMHO.
    Sorry I don't have a better answer for you.

Maybe you are looking for