I can't write holding registers

hay My program mast visualize some data of a controller. This with an Ethernet connection. I can read everything and I can write coils bet I cant write the holding registers. I hope someone can help? Heir my VI: Rutte
Solved!
Go to Solution.
Attachments:
Master.zip ‏824 KB

Thanks for the Flat sequences tip. And for clean up my mess JI think the data must be 16 bit integer because I can read it with 16 bit integer.I also think that the values must fit into 2 consecutive modbus registers. Because when I read it fits. Now I have typecast the data ant I have convert it to I16. bet it didn’t work. What do you mien with split/join numbers?
Attachments:
holding registers.doc ‏40 KB

Similar Messages

  • Modbus RTU - Reading Holding registers problem - Novus myPCLab

    Hello,
    I'm trying for a few days to read Holding registers in Novus myPCLab (it uses Modbus RTU protocol). I used both DSC module and Modbus library with no success (it appears to connect correctly but cant read).
    I need to read the given current.
    Does anyone have any idea about what am I doing wrong? 
    Here are my vi and the modbus address.
    Via DSC
    I used the PLC address at "HR Inicial" and 1 at "numero de registros"
    Via library
    I used the PLC address in "starting address"
    Solved!
    Go to Solution.

    My problem now is that my VI doesn't stops after I stop the while loop, it is necessary for a flat sequence implementation.
    Or my other best option is to read and write without closing the Modbus connection. Is that possible with a global variable? 
    I guess I do have to execute this "Modbus VI" to get my variables at a Main VI if they are in the same project. So, can I make my "Modbus VI" works in the background while the Main VI (who reads and write the addresses from the global variable) works, and when I finish running it, they stop together?
    ModBUS VI

  • Dsc modbus - Serial communication input/holding registers

    Hello,
    I am trying to create a labview application to act as a Modbus master and control multiple stepper motors. I have the DSC module in labview and am using a serial communication with an RS-485 converter. I have followed this guide: http://www.ni.com/white-paper/13911/en/  However, the driver I am using does not support coils, it only uses input and holding registers and I have not found a guide or tutorial that shows me how to create a labview application that can read and write to a specific address. For now all I want to do is turn the motor on and off using labview. I have used a modbus simulator to communicate with the driver and can do everything I want to do through the simulator. I can not get labview to do anything for me. I would be very happy if someone could direct me to a tutorial that can help me understand labview dsc module for reading and writing to addresses using modbus. 
    Meesh

    Ok, so this is really strange. I solved my problem in a round about sort of way. I'm using a modbus simulator (mdbus) to help me communicate with the driver/stepper motor so I know which address to use. But after I use the simulator I get a communication port error when I try to use Labview. It's like the port is locked in with the simulator and I can't end the connection and let Labview use the same communication port. I can't find anyway to fix the problem except going to this NI site: http://www.ni.com/download/labview-run-time-engine-6.1/746/en/  downloading this software and using the "repair" function. Then I can do a system restart and cycle the power on the driver/motor and then Labview with work again through the correct port. But if I need to use the simulator again then I have to go through this whole process again. Does anyone know what the heck is going on? Or if there is a better way to clear the communication port?? 

  • Failure of LabVIEW DSC 8.0.1 to yield values of Modbus RTU holding registers

    So, I know what I'm doing--or used to. Have done this before in LV 6 and 7. Previously used Lookout OPC drivers and the "Tag Engine".
    Recently with 8.0.1, I first set up the Industrial Automation OPC servers (AKA Lookout) to communicate with the holding registers (40,001-49,999) of my modbus rtu Watlow 96 and MLS316 temperature controllers. Subsequently, with the Server Explorer all of my 133 parameters on our 2 rs485 serial ports are communicating bidirectionally.
    So now Duh, why can I not bind a shared variable to register, say 40,334, and eliminate the OPC? The data is always reported as bad. Neither can I link shared variables to these addresses through the OPC I/O server.
    Am I missing something? Are there any examples of code available where individual modbus holding registers are communicated with bidirectionally?

    Well, this may seem rather silly but I viewed the video demo that NI has on binding modbus registers to shared variables before I even made my attempt.
    Now, differing from the demo video, I am using modbus RTU on a serial port.  Also differing from the video, when I create my shared variables, they are not placed in the same lvlib as the modbus server just created--LabVIEW prompts for a new library to be created.
    Could the NI product service staff please test with a serial modbus RTU device (a real living creature and not just a simulation please) the bidirectional communications and prove functionality with the Shared Variable Monitor of your product?  I suggest that you attempt communicating with holding registers 40,001 through 49,837.
    By the way, my com is set up correctly for I can view and or change all of the desired modbus RTU registers using the OPC Lookout Protocol Drivers through the Server Explorer.
    Please do not send me any more links to videos that test with simulations.  A real solution is required.
    Lloyd Ploense

  • Hi, the problem of deleting files / videos seeds desktop to go into Terminal and then sudo rm-rf ~ /. Trash Pohangina the answers I've had e of someone in her forum but when I write procedures line in Terminal as the Krever my password and it can not writ

    Hi, the problem of deleting files / videos seeds desktop to go into Terminal and then sudo rm-rf ~ /. Trash Pohangina the answers I've had e of someone in her forum but when I write procedures line in Terminal as the Krever my password and it can not write anything there, I write but nothing comes and my problem is not löst.När I want to delete the movie / video image Frin desktop still arrive Finder wants to make changes.Type your password to allow this. But even that I type my password file / video is left I need help in an easier way or another set-even those on the terminal that I can not type my password to solve the problem Regards Toni

    If you want to preserve the data on the boot drive, you must try to back up now, before you do anything else.
    There are several ways to back up a Mac that isn't fully working. You need an external hard drive to hold the backup data.
    1. Boot from the Recovery partition or from a local Time Machine backup volume (option key at startup.) Launch Disk Utility and follow the instructions in this support article, under “Instructions for backing up to an external hard disk via Disk Utility.”
    2. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode. Use the working Mac to copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    3. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.

  • The light on my apple tv is blinking furiously.  i've held down the menu button, plugged and unplugged it, and just tried restoring it via micro usb.  but the restore downloads then says it can't finish because it can't write to the disc.  lost lost

    how do i get the light on my apple tv to stop blinking?  have tried all the recommended methods, including holding down "menu" on remote, plugging and unplugging etc.  when i try to restore via itunes it downloads then when it's done says it can't write to disc.

    Hi lostinmedford,
    Welcome to the Apple Support Communities!
    I understand that the light is quickly flashing on your Apple TV and you are unable to restore it. According to the attached article, you are working through the correct steps by trying to reset and restore the Apple TV. In this situation, if the restore did not resolve the issue, it may be necessary to have the Apple TV evaluated for service by using the link in the attached article. 
    Apple TV: About the status light - Apple Support
    Flashes quickly
    Having issues. Try restarting or waking your Apple TV. If your Apple TV does not start up properly, you might need to reset the Apple TV or restore it to factory settings. See Apple TV (2nd and 3rd generation): Restoring your Apple TV. If this does not resolve the issue, refer to the Service FAQ for additional assistance.
    Best regards,
    Joe

  • How can i write and read the same data

    hi,
             i have attached my program to this mail. i have some problems in this program.
    problems:
    1. I want to select the threshold for the rms,varience and s.d.
    But what i used is not doing that. i want to fix the upper threshold value and lower threshold value.
     when ever the input crosses upper threshold value i want the output and it will remains uptill the value above the lower threshold value.
    Once it come down the lower threshold value the output should be stopped.
    2. I want to write this in to a  file and i want to read this file. is this possible or not. 
                please try to help me i am very new with lab view6i
           REGARDS
    CHAMARTHY KOMAL DILEEP.
       [email protected]
    Attachments:
    dileep.vi ‏93 KB

    The easiest way to perform a certain action (such as file I/O) based on a certain condition (such as whether a value has passed a certain threshold) is to use a comparison VI in combination with a case structure. Then you can specify that if your rms, standard deviation and variance are above a threshold then perform a certain action.
    Also consider using shift registers to keep track of data from the last loop. If I understand you correctly, you want to start logging data when an upper threshold has been passed. Then you want to continue logging data until a lower threshold is passed. I have attached a non-functional but explanatory VI that will help explain how to implement logic to that effect. It also demonstrates that you can indeed write and read from the same file in a loop. The best way to do this is to open the file before the loop, do all the necessary writing and reading in the loop, and then close the file after the loop.
    Hope this helps!
    Jarrod S.
    National Instruments
    Attachments:
    dileep_example.vi ‏61 KB

  • Can we write more than one routing rule in a RS?

    Can we write more than one routing rule in a RS?

    You can specify multiple routing rules for a single operation of a routing service. If no filter is applied, they are all executed. For routing rules with filters, only the target operations for which the filter condition holds are invoked. Priority is based on the order in which they appear in the routing rules window.
    Ronald

  • I configurated mi ipad in spanish and I can't write a semi-colon, because instead of a semi-colon, it writes our letter ñ. How can I write a semi-colon?

    I configurated mi ipad in spanish and I can't write a semi-colon, because instead of a semi-colon, it writes our letter ñ. How can I write a semi-colon?

    Let's synchronize...
    I'm using an iPad 2 running iOS 4.3.2.
    Use Settings > General > Keyboard > International Keyboards > Add New Keyboard > Spanish.
    Touch Spanish > QWERTY-Spanish (Software Keyboard Layout) > Spanish (Hardware Keyboard Layout).
    Are you still with me?
    Go to your application where you want to use the new keyboard and select the keyboard "Español" by touching and holding the key with the globe on it.
    Now, touch and hold the comma.
    What do you see?

  • Reading Holding Registers Float Modbus RTU

    I'm having an issue with ready any floating point number correctly off of a Shark 100 Power Meter.
    I can sucessifully read a block of registers containing the meter name and serial number as 16 bit characters.
    For example when I read registers 1-16 on the map and flattening them to a string, I get a fully working string returned.
    When I try and read holding registers 1012-1013 (Amps A) I get really funny numbers when I convert to a float.
    Here is my code so far
    With my front pannel settings:
    Expected Value I'm looking to have returned: 11.11 Amps
    but
    When I use an indicator to read the registers: 19265, 0
    Same value when I do a conversion
    When I do a type casting to a float: 1.26484E+7
    I've tried some different combinations such as reading only one register and joining the numbers, both in big-endian and little-endian order, still no luck.
    Please Help!
    Here is the modbus float definition as defined the owners manual:
    Solved!
    Go to Solution.

    The float format you posted is the same as LV uses, so if you put example values (Register 1 = C4E1, Register 2 = 1DB9) in the code below it will give you right result.
    What is the full value of your "Output Registers"? You should have two values in numeric array for this to work.

  • How do I read ModBus counter holding registers in Lookout 5

    We are using Lookout v5 with Zetron M1700 and M1716 RTUs. The M1700 is Modbus1 and the M1716 is Modbus2.
    We need to be able to count the number of times a digital input is turned on and off over a period of time.
    We are using digital input #9 on the M1716 RTU. According to the Zetron literature, the counter holding registers for digital input #9 are 42091-42093 for the value and 42094-42096 for the period.
    I tried to calculate the the value stored in the registers by using this formula which was suggested by Zetron in an expression:
    (((Modbus2.42093*10000)+Modbus2.42092)*10000)+Modbus2.42091
    However, this always returns zero.
    I read through your example on reading the BCD registers and doing calculation
    s on them but it hasn't helped me with my problem.
    Is there some command I need to use or a special type of an object I need to use to read the counter holding registers?
    I know we are communicating with Modbus2 properly because I can see when the digital input is on or off.
    Any help is greatly appreciated.

    Hi,
    Is it possible to share or point us to the Zetron literature explaining this calculation?
    If you just read the registers 42091-42093 individually from Modbus2, what do you get?
    Alternatively, you can maybe count the digital line directly in Lookout. For this, you would create a Counter object and specify the digital input as the "Count=" input. Not sure if this is a feasible option for you.
    Again, if you can share the Zetron documentation, I can take a look at it to see why it may not be working.
    Regards,
    Khalid

  • Modbus - Issues with Reading Holding Registers

    I am trying to read the holding registers on a RS485 2 wire modbus power monitor (Veris Industries E50C2).I am receiving bytes from the device so there appears to be communication. However, the response string is the exact same string as my command string. For instance, I am sending the hexadecimal string 0103 0000 0005 in order to read the first 5 holding registers, but I am receiving this exact same string back via the read VISA read function. I have attached an image of my VI. I would expect to see the response as "0103 (the device ID and command) followed by the number of bytes to follow and the contents of the holding registers.
    The VI is running on a cRIO 9012 with 9111 chassis. I am using the 9871 c-series RS485/RS422 interface module.
    Any ideas what the issue may be?
    Kind Regards
    Adam
    Attachments:
    Modbus VI.png ‏15 KB

    I indeed manage to fix the issue for myself.
    I used the same method you are starting right now, i conencted the NI9871 to the rs485 adapter given by the supplier and tried sending and reading my own signals.
    After much hassle and some changes to your (and my) initial vi setup as shown in your first post, everything worked out fine:
    (see the attached picture)
    1. I used the NI modbus VIs, but it worked as well with the normal visa commands and building the modbus command on your own, but  way easier with the NI VIs.
    2. i added the function to resize the buffer to its maximum size (not sure if thats actually helping with anything, but better be safe then sorry).
    3. Change the wire mode for the 9871 to rs485/wire2-auto with a property node.
    4. remove the large delay between write and read
    5. Last but not least, the one thing that changed the fact that i only received my own echo:
    I changed the connection of the Rx+/Tx+ and Rx-/Tx- around, basically connecting the 2wire sensor the other way around the manufacturer said it should be connected to the master device.
    (6. Recheck the amount of stop bits, all modbus device i use in my lab are using 2 stop bits, but that could be a coincidence)
    Maybe  something of that list helps you
    Attachments:
    Modbustest01.jpg ‏95 KB

  • Modbus tcp read holding registers not returning requested quantity

    Background:  I have a customer using an ELAU motion system - they are recording data to Holding Registers that they want to be able to read on a cRIO to match up with some analog data from FPGA (I have digital handshaking happening for that).
    LabVIEW 2010 SP1
    cRIO 9074
    Using the NI MOdbus.llb VI Library to communicate with the other system.  I can open the TCP communication no problem, and actually get SOME registers, just not ALL of the register data I want to read. 
    What I want to do is read 330 individual holding registers U16 values.  I know how the data is being split to represent various lengths (i.e. most data items are using 2 registers to represent one 32 bit number).  I just want to read all the individual registers and parse the data in another VI to convert it to the other data types.
    I provide the MB Ethernet Master Query (poly).vi with the starting address for the first register and then the quantity of 330.  The polymorphic instance selected the is "Read Holding Registers".  The array returned from this VI via "Holding Registers" is only 74 elements and not 330 requested.  I get no exception codes and no LV errors.  Is there some inherent limit on the number of Holding Registers that can be read?
    I am not using the MBAP Header input (not sure if that is needed).
    Thank you.
    Ryan Vallieu
    Automation System Architect
    Solved!
    Go to Solution.

    Simple solution once I dug into the MODBUS Serial protocol/TCP protocol documentation available out there via Google.
    Serial based modbus history is the limitation that carried over to TCP - the maximum amount of bytes in one data pack can only be 256 bytes.  Thus I was limited to around ~125 registers at once.
    256 bytes = 2048 bits.  Using 16 bit registers that gives 128 registers maximum.  I went with 125 to make keeping track of totals easier.
    Ryan Vallieu
    Automation System Architect

  • I can no longer hold down a key and get the character to repeat as say, aaaaa. Instead I get a menu of accented a's, such as àáâäæãåā. I can't find any thing in the System Preferences that allows my to turn this function off

    I can no longer hold down a key and get the character to repeat as say, aaaaa. Instead I get a menu of accented a's, such as àáâäæãåā. I can't find any thing in the System Preferences that allows my to turn this function off.

    Back up all data before proceeding.
    Please triple-click anywhere in the line below on this page to select it:
    defaults write -g ApplePressAndHoldEnabled NO
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    Wait for a new line ending in a dollar sign ($) to appear below what you entered. You can then quit Terminal. Log out or restart the computer.

  • How can i write a string into a specified pos of a file?

    How can i write a string into a specified pos of a file without read all file into ram and write the whole file again?
    for example:
    the content of file is:
    name=123
    state=456
    i want to modify the value of name with 789
    (write to file without read all file into ram)
    How can i do it? thank you

    take this as an idea. it actually does what i decribed above. you sure need to make some modifications so it works for your special need. If you use it and add any valuable code to it or find any bugs, please let me know.
    import java.io.*;
    import java.util.*;
    * Copyright (c) 2002 Frank Fischer <[email protected]>
    * All rights reserved. See the LICENSE for usage conditions
    * ObjectProperties.java
    * version 1.0, 2002-09-12
    * author Frank Fischer <[email protected]>
    public class ObjectProperties
         // the seperator between the param-name and the value in the prooperties file
         private static final String separator = "=";
         // the vector where we put the arrays in
         private Vector PropertiesSet;
         // the array where we put the param/value pairs in
         private String propvaluepair[][];
         // the name of the object the properties file is for
         public String ObjectPropertiesFileName;
         // the path to the object'a properties file
         public String ObjectPropertiesDir;
         // reference to the properties file
         public File PropertiesFile;
         // sign for linebreak - depends on platforms
         public static final String newline = System.getProperty("line.separator");
         public ObjectProperties(String ObjectPropertiesFileName, String ObjectPropertiesDir, ObjectPropertiesManager ObjectPropertiesManager)
         //     System.out.println("Properties Objekt wird erzeugt: "+ObjectPropertiesFileName);
              this.ObjectPropertiesFileName = ObjectPropertiesFileName;
              this.ObjectPropertiesDir = ObjectPropertiesDir;
              // reference to the properties file
              PropertiesFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
              // vector to put the param/value pair-array in
              PropertiesSet = new Vector();
         //     System.out.println("Properties File Backup wird erzeugt: "+name);
              backup();
         //     System.out.println("Properties File wird eingelesen: "+PropertiesFile);
              try
                   //opening stream to file for read operations
                   FileInputStream FileInput = new FileInputStream(PropertiesFile);
                   DataInputStream DataInput = new DataInputStream(FileInput);
                   String line = "";
                   //reading line after line of the properties file
                   while ((line = DataInput.readLine()) != null)
                        //just making sure there are no whitespaces at the beginng or end of the line
                        line = cutSpaces(line);
                        if (line.length() > 0)
                             //$ indicates a param-name
                             if (line.startsWith("$"))
                                  // array to store a param/value pair in
                                  propvaluepair = new String[1][2];
                                  //get the param-name
                                  String parameter = line.substring(1, line.indexOf(separator)-1);
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  parameter = cutSpaces(parameter);
                                  //get the value
                                  String value = line.substring(line.indexOf(separator)+1, line.length());
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  value = cutSpaces(value);
                                  //put the param-name and the value into an array
                                  propvaluepair[0][0] = parameter;
                                  propvaluepair[0][1] = value;
                             //     System.out.println("["+ObjectPropertiesFileName+"] key/value gefunden:"+parameter+";"+value);
                                  //and finaly put the array into the vector
                                  PropertiesSet.addElement(propvaluepair);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while reading property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   // System.out.println("in ObjectProperties");
         // function to be called to get the value of a specific paramater 'param'
         // if the specific paramater is not found '-1' is returned to indicate that case
         public String getParam(String param)
              // the return value indicating that the param we are searching for is not found
              String v = "-1";
              // looking up the whole Vector
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = new String[1][2];
                   // trying to get out the array from the vector again
                   s = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we look up the value and write it in the return variable
                        v = s[0][1];
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // giving the value back to the calling procedure
              return v;
         // function to be called to set the value of a specific paramater 'param'
         public void setParam(String param, String value)
              // looking up the whole Vector for the specific param if existing or not
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we remove the param/value pair so we can add the new pair later in
                        PropertiesSet.removeElementAt(i);
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // if we land here, there is no such param in the Vector, either there was none form the beginng
              // or there was one but we took it out.
              // create a string array to place the param/value pair in
              String n[][] = new String[1][2];
              // add the param/value par
              n[0][0] = param;
              n[0][1] = value;
              // add the string array to the vector
              PropertiesSet.addElement(n);
         // function to save all data in the Vector to the properties file
         // must be done because properties might be changing while runtime
         // and changes are just hold in memory while runntime
         public void store()
              backup();
              String outtofile = "# file created/modified on "+createDate("-")+" "+createTime("-")+newline+newline;
              try
                   //opening stream to file for write operations
                   FileOutputStream PropertiesFileOuput = new FileOutputStream(PropertiesFile);
                   DataOutputStream PropertiesDataOutput = new DataOutputStream(PropertiesFileOuput);
                   // looping over all param/value pairs in the vector
                   for (int i=0; i<PropertiesSet.size(); i++)
                        //the String i want to read the values in
                        String s[][] = new String[1][2];
                        // trying to get out the array from the vector again
                        s = (String[][]) PropertiesSet.elementAt(i);
                        String param = "$"+s[0][0];
                        String value = s[0][1];
                        outtofile += param+" = "+value+newline;
                   outtofile += newline+"#end of file"+newline;
                   try
                        PropertiesDataOutput.writeBytes(outtofile);
                   catch (IOException e)
                        System.out.println("ERROR while writing to Properties File: "+e);
              catch (IOException e)
                   System.out.println("ERROR occured while writing to the property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
         // sometimes before overwritting old value it's a good idea to backup old values
         public void backup()
              try
                   // reference to the original properties file
                   File OriginalFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
                   File BackupFile = new File(ObjectPropertiesDir+"/backup/"+ObjectPropertiesFileName+".backup");
                   //opening stream to original file for read operations
                   FileInputStream OriginalFileInput = new FileInputStream(OriginalFile);
                   DataInputStream OriginalFileDataInput = new DataInputStream(OriginalFileInput);
                   //opening stream to backup file for write operations
                   FileOutputStream BackupFileOutput = new FileOutputStream(BackupFile);
                   DataOutputStream BackupFileDataOutput = new DataOutputStream(BackupFileOutput);
              //     String content = "";
                   String line = "";
                   // do till end of file
                   while ((line = OriginalFileDataInput.readLine()) != null)
                        BackupFileDataOutput.writeBytes(line+newline);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while back up for property file: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   System.out.println("this is a serious error - the server must be stopped");
         private String cutSpaces(String s)
              while (s.startsWith(" "))
                   s = s.substring(1, s.length());
              while (s.endsWith(" "))
                   s = s.substring(0, s.length()-1);
              return s;
         public String createDate(String seperator)
              Date datum = new Date();
              String currentdatum = new String();
              int year, month, date;
              year = datum.getYear()+1900;
              month = datum.getMonth()+1;
              date = datum.getDate();
              currentdatum = ""+year+seperator;
              if (month < 10)
                   currentdatum = currentdatum+"0"+month+seperator;
              else
                   currentdatum = currentdatum+month+seperator;
              if (date < 10)
                   currentdatum = currentdatum+"0"+date;
              else
                   currentdatum = currentdatum+date;
              return currentdatum;
         public String createTime(String seperator)
              Date time = new Date();
              String currenttime = new String();
              int hours, minutes, seconds;
              hours = time.getHours();
              minutes = time.getMinutes();
              seconds = time.getSeconds();
              if (hours < 10)
                   currenttime = currenttime+"0"+hours+seperator;
              else
                   currenttime = currenttime+hours+seperator;
              if (minutes < 10)
                   currenttime = currenttime+"0"+minutes+seperator;
              else
                   currenttime = currenttime+minutes+seperator;
              if (seconds < 10)
                   currenttime = currenttime+"0"+seconds;
              else
                   currenttime = currenttime+seconds;
              return currenttime;

Maybe you are looking for

  • Table TCOBL in ECC6

    Hi, We're currently trying to updgrade from 4.7 to ecc 6.0 and we're having some difficulties. In the transaction MIGO, we have a shortdump, screen 9000 not found. After some research we found that the screen number is taken from the table TCOBL. In

  • Adobe reader 8 / acrobat

    I have windows xp. I am trying to open a pdf file that was sent to me. I have adobe reader 8. I was told by my instructor I need acrobat to open it. Doesn't adober reader 8 have acrobat or do I need something else? I am Computer DUMB!! Please help me

  • For a 3.33v input, DAQ & MAX Test panels read 018v. What is missing in set up?

    Hi All: I am resurrecting a Labview setup that has not been used for a few years. The goal is to measure strain. Software is:         Labview 6.0  DAQ V6.8.0f9  MAX 2.0.3.6. Hardware is:  PCI-MIO-16E-1  SCXI-1000 Chassis  SCXI-1121 Module  SCXI-1320

  • WINRAR error when trying to extract NW2004s Sp11 (abap)

    Hello All, I received the following error when trying to extract NW2004s Sp11 <b>!   E:SAPNW2004sABAPTrialSP11.part1.rar: CRC failed in SAPNW2004sABAPTrialSP11imageloadload_datasave.gz. The file is corrupt !   E:SAPNW2004sABAPTrialSP11.part2.rar: CRC

  • Broken iMac display - nothing visible - How to set up external display?

    I have a 17" Core Duo 1.83 with a cracked screen. It boots but I can't see anything thru the cracks. I can access the system in Firewire Target Disk mode, which I used to wipe the HD and reinstall Leopard. Is there any way to boot the iMac in Display