Unwrap phase in simulation environment

Hi all,
I try to use the unwrap phase function (signal processing part) in simulation loop (control and simulation toolkit) but it dosn't work. could you please tell me how can I unwrap the phase in simulation environment.

Hi,
Please do only one post for this problem.
http://forums.ni.com/ni/board/message?board.id=280&message.id=3986
Regards
Manuel R
AE dans une autre vie

Similar Messages

  • Phase unwrapping

    Hi all,
    I'm still relartively new to LabView and there is one issue I have no luck in solving; unwrapping phase. Included is a simple vi with a tone measurement to detect phase from a simulated signal (the final program features DAQ assistants and frequency sweeping etc.). The issue is clear, the tone measurements operates within a certain range, for example a phase of 389 degrees is measured at 29 degrees. For my final program it is necessary to read the phase to values larger  than 2 pi (360 degrees).
    I have tried to implement the unwrap phase vi to no avial; my knowledge on LabView is not good enough and I can't seem to find the example suggested at support (labview\examples\analysis\measxmpl.llb) on the harddrive in college.
    Is there any advice or help one could offer me to increase the range at which the phase is measured?
    Attachments:
    Phase Measurement.vi ‏47 KB

    Yes, I understand how you will convert a time difference to a phase difference, but how will that make it any more possible to measure a phase difference of >360 degrees?
    See attached diagram - measuring A will give you the phase difference - x.  B and C would give you x+360 and x+720 respectively.
    How will you know which to measure?
    Dan
    CLD
    Attachments:
    untitled.JPG ‏27 KB

  • Wrong Phase using the Lock-in Tool kit

        Hi!
    We have been using the NI Lock-in toolkit. To test it, we have connected it to a system under test, that simply consists of a R/C low pass filter. This is useful, since we can calculate the exact response in advance.
    The amplitude (gain) response is correct and is always the same, however, when looking at the phase response, the first section is looking good but then it produces seemingly random and erratic results everytime.
    The phase response jumps around and produces 180 and 360 phase shifts.
    Has anyone ever had that problem? Any explanations for this behavior? Any remidies?
    Thanks,
    Markus Tarin
    movimed.com
    www.movimed.com - Custom Imaging Solutions
    www.movitherm.com - Advanced Thermography Solutions

    Hi Manfred!
    Our setup is very straight forward. We are using a generic M-Series board to generate the stimulus signal as follows:
    Output frequency for x-number of cycles - measure gain/phase response.
    To sample the response, we are using an S-Series board. All of it is done using DAQmx drivers, which again, I don't think makes any difference, since we are experiencing the same problems with a 'pure' software simulation.
    Our unit under test is comprised of a resistor and a capacitor, which represents a simple low pass filter with predictable gain/phase response.
    It appears to us that the erratic phase response at higher frequencies is a result of 1pi versus 2pi phase wrap or flip, which may not be handled correctly by the lock-in tool kit.
    We were thinking of "unwrapping" the phase, but I wanted to find an explanation for this behaviour first, to ensure that we are not dealing with a software bug.
    Also, where can we find the unwrap phase.vi?
    Thanks,
    Markus
    www.movimed.com - Custom Imaging Solutions
    www.movitherm.com - Advanced Thermography Solutions

  • Unable to connect offcard terminal with jcop simulator

    Hi all,
    I have made a JavaCard applet, called DisplayApplet.
    I am using Eclipse with the JCOP tools plugin.
    But now I want to make use of an own Terminal that connects to the applet and communicates to it using APDUs.
    I don't have a smart card reader/card, so I want to use the simulation environment.
    Now I read that I must use the "Remote" value in the JCTerminal constructor to connect to the simulation environment, but it doesn't work (of course I specify the remote value as input parameter).
    I am unable to open a terminal.
    I get the following exception at the term.open() command:
    can't find/open/connect/reset smartcard/reader:
    Failed to open [localhost:8050]: Connection refused: connect
    Can anyone tell me what's wrong and how I can connect from an own made terminal to a JCOP simulation (I want to run the terminal within Eclipse, because I want to add a UI later on top of it) ??
    Here is the code of my own made HostTerminal:
    import com.ibm.jc.*;
    public class HostTerminal {
         public static final String remoteTermName = "Remote";
         public static final String nativeTermName = "pcsc:4";
         public static final String remoteTermPara = null;
         public static final String nativeTermPara = null;
         public static void main(String[] args) {
              String termName = nativeTermName;
              String termPara = nativeTermPara;
              if (args.length > 0) {
                                   if (!args[0].equals("native")) {
                        if (args[0].equals("remote")) {
                             termName = remoteTermName;
                             termPara = remoteTermPara;
                        } else {
                             try {
                                  System.out.println("args[0] > " + args[0]);
                                  System.out.println("args[1] > " + args[1]);
                                  termName = args[0];
                                  termPara = args[1];
                             } catch (Exception e) {
                                  System.out.println("invalid command line options");
                                  System.exit(1);
              // create terminal, i.e. create a connection to a reader
              // and wait for a card insertion
              JCTerminal term = null;
              try {
                   term = JCTerminal.getInstance("Remote", null);
                   term.open();
                   term.waitForCard(5000);
              } catch (Exception e) {
                   System.out.println(
                        "can't find/open/connect/reset smartcard/reader: "
                             + e.getMessage());
                   System.exit(1);
              System.out.println("Connected to reader and card terminal ...");
              // now get the object representing the connection to the card
              JCard card = null;
              try {
                   card = new JCard(term, null, 1000);
              } catch (Exception e) {
                   System.out.println(
                        "can't connect to card in reader: " + e.getMessage());
                   System.exit(1);
              String s;
              // get atr of card and print it
              try {
                   ATR atr = card.getATR();
                   s = JCInfo.atrToString(atr);
                   System.out.println("Connected to card and received ATR: " + s);
              } catch (Exception e) {
                   System.out.println("can't get ATR: " + e.getMessage());
                   System.exit(1);
              // Note here that the DisplayApplet has to have to aid "display". The IDE
              // supports ascii characters in AIDs by using | when editing AIDs.
              // For instance, |display results in 636F756E746572.
              System.out.println("Selecting Display applet ...");
              DisplayApplet displayApplet = null;
              try {
                   byte[] aid = ("phil0Display").getBytes();
                   displayApplet = new DisplayApplet(card, aid);
                   displayApplet.select();
                   s = JCInfo.toHex(aid, 0, aid.length);
                   System.out.println(
                        "Selecting of Display applet with aid " + s + " succeeded");
              } catch (Exception e) {
                   System.out.println("can't select Display: " + e.getMessage());
                   System.exit(1);
              }

    If you run the JavaCard simulator from within Eclipse make sure you disconnect the JCOP shell before trying to connect via JCTerminal() from your Java program. Use the command /close
    If you want to disconnect the JCOP shell automatically modify your "Java Card Application" run-configuration:
    set Shell commands to execute: to /close
    BTW: You were talking about JCOP 3.0, the Eclipse 2.1-plugin or do you use the new pre-release version JCOP 3.1 for Eclipse 3?

  • Simulation using Eclipse plugin for JCOP tools

    Dear All,
    In search for a simulation environment for java card applet development I tried to use Eclipse plugin for JCOP tools.
    The samples which comes with the JCOP tools works fine but when try to debug my applet I receive the error: Wrong Data 6A 80.
    Generic JCOP v2.4.1 is selected for Java Card Simulation.
    Following is the JCOP Shell screen:
    cm- /term "Remote|localhost:8050"
    --Opening terminal
    /card -a a000000003000000 -c com.ibm.jc.CardManagerresetCard with timeout: 0 (ms)
    --Waiting for card...
    ATR=3B F8 13 00 00 81 31 FE 45 4A 43 4F 50 76 32 34 ;.....1.EJCOPv24
    31 B7 1.
    IOCTL().
    ATR: T=1, FI=1/DI=3 (93clk/etu), N=0, IFSC=254, BWI=4/CWI=5, Hist="JCOPv241"
    => 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00 ..............
    (908058 nsec)
    <= 6F 65 84 08 A0 00 00 00 03 00 00 00 A5 59 9F 65 oe...........Y.e
    01 FF 9F 6E 06 47 91 92 18 00 00 73 4A 06 07 2A ...n.G.....sJ..*
    86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B .H..k.`...*.H..k
    02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64 ....c...*.H..k.d
    0B 06 09 2A 86 48 86 FC 6B 04 02 15 65 0B 06 09 ...*.H..k...e...
    2B 85 10 86 48 64 02 01 03 66 0C 06 0A 2B 06 01 +...Hd...f...+..
    04 01 2A 02 6E 01 02 90 00 ..*.n....
    Status: No Error
    cm> set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f
    cm> init-update 255
    => 80 50 00 00 08 B1 04 15 2B 41 3F 62 AB 00 .P......+A?b..
    (2668 usec)
    <= 00 00 F9 02 71 E3 BB AD BD CD FF 02 00 00 3D 02 ....q.........=.
    9C 31 C7 89 AD 44 8E 13 17 15 2E 5A 90 00 .1...D.....Z..
    Status: No Error
    cm> ext-auth plain
    => 84 82 00 00 10 CE 6C DC D2 8C BE 5E 33 EC 58 D0 ......l....^3.X.
    57 3A 52 D2 24 W:R.$
    (2288 usec)
    <= 90 00 ..
    Status: No Error
    cm> delete -r a00000006203010c04
    => 80 E4 00 80 0B 4F 09 A0 00 00 00 62 03 01 0C 04 .....O.....b....
    00 .
    (1084 usec)
    <= 6A 88 j.
    Status: Reference data not found
    jcshell: Error code: 6a88 (Reference data not found)
    jcshell: Wrong response APDU: 6A88
    Ignoring expected error
    cm> upload -d -b 250 "D:\JCOP\eclipse\projects\DigitalTachograph\bin\digitaltachograph\javacard\digitaltachograph.cap"
    => 80 E6 02 00 16 09 A0 00 00 00 62 03 01 0C 04 08 ..........b.....
    A0 00 00 00 03 00 00 00 00 00 00 00 ............
    (2100 usec)
    <= 00 90 00 ...
    Status: No Error
    => 80 E8 00 00 FA C4 82 84 42 01 00 25 DE CA FF ED ........B..%....
    02 02 04 00 01 09 A0 00 00 00 62 03 01 0C 04 11 ..........b.....
    64 69 67 69 74 61 6C 74 61 63 68 6F 67 72 61 70 digitaltachograp
    68 02 00 21 00 25 00 21 00 0E 00 29 03 3E 00 CD h..!.%.!...).>..
    23 D2 01 BB 04 44 00 00 09 E3 4B E5 00 11 00 05 #....D....K.....
    01 A2 04 01 00 04 00 29 04 00 01 07 A0 00 00 00 .......)........
    62 00 01 02 01 07 A0 00 00 00 62 01 01 02 01 07 b.........b.....
    A0 00 00 00 62 01 02 02 01 07 A0 00 00 00 62 02 ....b.........b.
    01 03 00 0E 01 0A A0 00 00 00 62 03 01 0C 04 01 ..........b.....
    01 DF 06 00 CD 00 00 00 80 00 00 FF 00 01 00 00 ................
    00 01 81 03 13 00 12 07 03 00 00 02 01 03 06 0B ................
    8C 81 00 00 00 80 00 0B 00 0B 01 01 00 00 0B F9 ................
    00 80 00 11 00 0F 01 01 00 10 0E A9 0D D4 0D F7 ................
    0E 07 0E 18 0E 26 0E 35 0E 44 0E 50 0E 72 0E 81 .....&.5.D.P.r..
    0E 90 0E 9B 0E F5 11 05 11 1A 11 50 00 80 00 05 ...........P....
    00 04 01 04 00 01 13 AF 13 B5 13 BA 14 0C 13 00 ................
    (6775 usec)
    <= 6A 80 j.
    Status: Wrong data
    jcshell: Error code: 6a80 (Wrong data)
    jcshell: Wrong response APDU: 6A80
    Unexpected error; aborting execution
    I will be very happy if you can help me. I am desperately in need of a working debugging environment.
    Thanks in advance!
    Kind regards,
    Mehmet

         * Processes incoming READ_BINARY APDUs. Returns data of the currently
         * selected file.
         * @param apdu   where the offset is carried in header bytes p1 and p2.
         * @param le  expected length by terminal
         * @return length of the response APDU
        private short processReadBinary(APDU apdu, boolean protectedApdu,  short leUnprotected) {
            if (!hasFileSelected()) {
                ISOException.throwIt(SW_CONDITIONS_NOT_SATISFIED);
            byte[] buffer = apdu.getBuffer();
            // retrieve p1p2 from apdu buffer
            byte p1 = buffer[OFFSET_P1];
            byte p2 = buffer[OFFSET_P2];
            short offset = Util.makeShort(p1, p2);     // offset encoded in P1/P2, 15 lowest bit
            // offset encoded in P1/P2, 15 lowest bit
            // check if le != 0 <-- no response expected
            if (leUnprotected == 0) {
                ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
            if (selectedFile == null) {
                ISOException.throwIt(ISO7816.SW_FILE_NOT_FOUND);
            if ((selectedFile.getAccessConditions() & READ_REQUIRES_SM) == READ_REQUIRES_SM) {
                if(!protectedApdu)
                   ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
            short fileSize = (short) selectedFile.getFileLength();
            // check offset
            if (offset >= fileSize) {
                ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);
            // check expected length
            if ((short) (offset + leUnprotected) > fileSize) {
                ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
                //ISOException.throwIt(SW_TAMAM);
            short bufferOffset = 0;
            crypto.setEncryptionStatus(isSelectedFileEncrypted());
            if (protectedApdu) {
                bufferOffset = crypto.getApduBufferOffsetDT(leUnprotected);
                if(isSelectedFileEncrypted())
                   bufferOffset = crypto.getApduBufferOffset(leUnprotected);
                apdu.setOutgoing();
            Util.arrayCopyNonAtomic(selectedFile.getData(), offset, buffer, bufferOffset, leUnprotected);
            return leUnprotected;
         * Processes and UPDATE_BINARY apdu. Writes data in the currently selected
         * file.
         * @param apdu
         *            carries the offset where to write date in header bytes p1 and
         *            p2.
        private void processUpdateBinary(APDU apdu, boolean protectedApdu) {
            if (!hasFileSelected() || isLocked()) {
                ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
            if ((selectedFile.getAccessConditions() & DigitalTachograph.UPDATE_ALW) != DigitalTachograph.UPDATE_ALW) {
                if ((selectedFile.getAccessConditions() & DigitalTachograph.UPDATE_REQUIRES_SM) != DigitalTachograph.UPDATE_REQUIRES_SM) {
                    ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
                    return;
                }else if(!protectedApdu){
                        ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
            byte[] buffer = apdu.getBuffer();
            byte p1 = buffer[OFFSET_P1];
            byte p2 = buffer[OFFSET_P2];
            short offset = Util.makeShort(p1, p2);
            short readCount = (short) (buffer[ISO7816.OFFSET_LC] & 0xff);
            //if (!protectedApdu){
                readCount = apdu.setIncomingAndReceive();
            while (readCount > 0) {
                selectedFile.writeData(offset, buffer, OFFSET_CDATA, readCount);
                offset += readCount;
                readCount = apdu.receiveBytes(ISO7816.OFFSET_CDATA);
        private short processInternalAuthenticate(APDU apdu , boolean protectedApdu) throws CryptoException {
            byte[] buffer = apdu.getBuffer();
            short lc = (short) (buffer[OFFSET_LC] & 0xFF);
            if (lc != (short) (KID_LENGTH * 2)) {
                ISOException.throwIt(SW_WRONG_LENGTH);
            if (apdu.setIncomingAndReceive() != lc) {
                ISOException.throwIt(ISO7816.SW_WRONG_DATA);
            // Check if VU.CHR maches the one of the selected certificate on the card
            if (Util.arrayCompare(buffer, (short) (OFFSET_CDATA + KID_LENGTH), keyStore.selected_KID, (short) 0, KID_LENGTH) != 0) {
                ISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);
            if (Util.arrayCopyNonAtomic(buffer, OFFSET_CDATA, Rnd1, (short) 0, (short) 8) != (short) 8) { // Receive Rnd1
                ISOException.throwIt(ISO7816.SW_WRONG_DATA);
            // Hash(PRnd2||K1||Rnd1||VU.CHR)
            random.generateData(PRnd2, (short) 0, (short) 90);
            random.generateData(K1, (short) 0, (short) 16);
            crypto.shaDigest.update(PRnd2, (short) 0, (short) 90); // PRnd2
            crypto.shaDigest.update(K1, (short) 0, (short) 16); // PRnd2||K1
            crypto.shaDigest.doFinal(buffer, OFFSET_CDATA, lc, digest, (short) 0); //Rnd1||VU.CHR
            BigNumber mod = new BigNumber((short) 128);
            mod.init(keyStore.Card_PubMod, (short) 0, (short) keyStore.Card_PubMod.length, BigNumber.FORMAT_HEX);
            mod.subtract(signed, (short) 0, (short) 128, BigNumber.FORMAT_HEX);
            if (mod.compareTo(signed, (short) 0, (short) 128, BigNumber.FORMAT_HEX) == -1) {
                mod.toBytes(signed, (short) 0, (short) 128, BigNumber.FORMAT_HEX);
            // To be added: if the selected private key is considered corrupted, the processing state returned is '6400' or '6581'.
            signed[0] = (byte) 0x6A;
            Util.arrayCopyNonAtomic(PRnd2, (short) 0, signed, (short) 1, (short) 90);
            Util.arrayCopyNonAtomic(K1, (short) 0, signed, (short) 91, (short) 16);
            Util.arrayCopyNonAtomic(digest, (short) 0, signed, (short) 107, (short) 20);
            signed[127] = (byte) 0xBC;
            if (!keyStore.cardPrivateKey.isInitialized()) {
                CryptoException.throwIt(CryptoException.ILLEGAL_VALUE);
            try {
                crypto.rsaSigner.init(keyStore.cardPrivateKey, Signature.MODE_SIGN);
                crypto.rsaSigner.doFinal(signed, (short) 0, (short) 128, signed, (short) 0);
            } catch (Exception e) {
                ISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);
            if (!keyStore.selectedPublicKey.isInitialized()) {
                CryptoException.throwIt(CryptoException.ILLEGAL_VALUE);
            try {
                crypto.rsaCipher.init(keyStore.selectedPublicKey, Cipher.MODE_ENCRYPT);
                crypto.rsaCipher.doFinal(signed, (short) 0, (short) 128, signed, (short) 0);
            } catch (Exception e) {
                ISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);
            apdu.setOutgoing();
            Util.arrayCopyNonAtomic(signed, (short) 0, buffer, (short) 0, (short) 128);
            return (short) signed.length;
        private void processExternalAuthenticate(APDU apdu) {
            short equipmentType = 0;
            if (keyStore.Selected_Cert != null) {
                equipmentType = (short) keyStore.Selected_Cert.CHA[6]; // check equipment type
            if (equipmentType != (short) 1 && equipmentType != (short) 2 && equipmentType != (short) 3 && equipmentType != (short) 4 && equipmentType != (short) 6) {
                ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED); // Instead of 6F00 throw a more meaningfull SW in case CHA is not valid.
            if (Util.arrayCompare(keyStore.Selected_Cert.CHA, (short) 0, TACHOGRAPH_AID, (short) 0, (short) 6) != 0) {
                ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED);
            byte[] buffer = apdu.getBuffer();
            byte p1 = (byte) (buffer[OFFSET_P1] & 0xff);
            byte p2 = (byte) (buffer[OFFSET_P2] & 0xff);
            if (p1 != 0 || p2 != 0) {
                ISOException.throwIt(SW_WRONG_P1P2);
            short lc = (short) (buffer[OFFSET_LC] & 0xFF);
            if (lc != (short) (128)) {
                ISOException.throwIt(SW_WRONG_LENGTH);
            if (apdu.setIncomingAndReceive() != lc) {
                ISOException.throwIt(ISO7816.SW_WRONG_DATA);
            Util.arrayCopyNonAtomic(buffer, OFFSET_CDATA, signed, (short) 0, (short) 128); // receive the cryptogram from the VU
            // decrypt the encrypted message with the card private key
            try {
                crypto.rsaCipher.init(keyStore.cardPrivateKey, Cipher.MODE_DECRYPT);
                crypto.rsaCipher.doFinal(signed, (short) 0, (short) 128, signed, (short) 0);
            } catch (Exception e) {
                ISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);
            // verify the signature with the VU public key
            try {
                crypto.rsaCipher.init(keyStore.selectedPublicKey, Signature.MODE_VERIFY); // Cipher.MODE_ENCRYPT
                crypto.rsaCipher.doFinal(signed, (short) 0, (short) 128, signed, (short) 0);
            } catch (Exception e) {
                ISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);
            if (signed[0] != (byte) 0x6A || signed[127] != (byte) 0xBC) {
                ISOException.throwIt(Util.makeShort(signed[0], signed[127]));
            try {
                verifyCardCertificates();
                Util.arrayCopyNonAtomic(signed, (short) 1, preDigest, (short) 0, (short) 106); // accumulate preDigest
                Util.arrayCopyNonAtomic(Rnd3, (short) 0, preDigest, (short) 106, (short) 8); // accumulate preDigest
                Util.arrayCopyNonAtomic(keyStore.Card_Cert.CHR, (short) 0, preDigest, (short) 114, (short) 8); // accumulate preDigest
                Util.arrayCopyNonAtomic(signed, (short) 91, K2, (short) 0, (short) 16); // receive K2 value
                crypto.shaDigest.update(signed, (short) 1, (short) 106); // PRnd4||K2
                crypto.shaDigest.update(Rnd3, (short) 0, (short) 8); // Rnd3
                crypto.shaDigest.doFinal(keyStore.Card_Cert.CHR, (short) 0, (short) 8, digest, (short) 0); //||Card.CHR
            } catch (Exception e) {
                ISOException.throwIt(SW_TAMAM);
            if (Util.arrayCompare(signed, (short) 107, digest, (short) 0, (short) 20) != 0) {
                ISOException.throwIt(SW_TAMAM);
            volatileState[0] |= MUTUAL_AUTHENTICATED;
            try {
                DTUtil.xor(K1, (short) 0, K2, (short) 0, KaKb, (short) 0, (short) 16);
                Util.arrayCopyNonAtomic(Rnd3, (short) 4, SSC, (short) 0, (short) 4); // tail of Rnd3
                Util.arrayCopyNonAtomic(Rnd1, (short) 4, SSC, (short) 4, (short) 4); // tail of Rnd1
            } catch (Exception e) {
                ISOException.throwIt(SW_TAMAM);
            try {
                keyStore.setKey_Ka(KaKb, (short) 0);
                keyStore.setKey_Kb(KaKb, (short) 8);
                keyStore.setSecureMessagingKeys(KaKb, (short) 0, KaKb, (short) 0);
            } catch (Exception e) {
                ISOException.throwIt(SW_TAMAM_DEGIL);
            return;
        private short returnPreDigest(APDU apdu) {
            byte[] buffer = apdu.getBuffer();
            apdu.setOutgoing();
            Util.arrayCopyNonAtomic(preDigest, (short) 0, buffer, (short) 0, (short) 122);
            return (short)preDigest.length;
        private short returnDigest(APDU apdu) {
            byte[] buffer = apdu.getBuffer();
            apdu.setOutgoing();
            Util.arrayCopyNonAtomic(digest, (short) 0, buffer, (short) 0, (short) 20);
            return (short)digest.length;
        private short returnOriginalText(APDU apdu) {
            byte[] buffer = apdu.getBuffer();
            apdu.setOutgoing();
            Util.arrayCopyNonAtomic(signed, (short) 0, buffer, (short) 0, (short) 128);
            return (short)signed.length;
        private void processVerify(APDU apdu) { // Verify_CHV(Pin_Ws)
            byte[] buffer = apdu.getBuffer();
            // retrieve the PIN data for validation.
            byte byteRead = (byte) (apdu.setIncomingAndReceive());
            // the PIN data is read into the APDU buffer
            // at the offset ISO7816.OFFSET_CDATA the PIN data length = byteRead
            if (pin.check(buffer, ISO7816.OFFSET_CDATA, byteRead) == false) {
                ISOException.throwIt(SW_VERIFICATION_FAILED);
            return;
        private void processPSO(APDU apdu) { // verify certificate
            byte[] buffer = apdu.getBuffer();
            byte p1 = (byte) (buffer[OFFSET_P1] & 0xff);
            byte p2 = (byte) (buffer[OFFSET_P2] & 0xff);
            short lc = (short) (buffer[ISO7816.OFFSET_LC] & 0xFF);
            if (p1 == (byte) 0x00 && p2 == P2_VERIFYCERT) {
                if (lc != TACHO_CERT_LENGTH) {
                    ISOException.throwIt(SW_WRONG_LENGTH);
                if (apdu.setIncomingAndReceive() != lc) {
                    ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
                try { // copy the certificate to be verified from APDU buffer to cert object
                    Util.arrayCopyNonAtomic(buffer, OFFSET_CDATA, cert, (short) 0, lc);
                } catch (Exception e) {
                    ISOException.throwIt(SW_TAMAM);
                if (Util.arrayCompare(keyStore.selected_KID, (short) 0, keyStore.ERCA_KID, (short) 0, KID_LENGTH) == 0) {
                    keyStore.VUCA_Cert.verifyCert(cert, keyStore.selectedPublicKey, keyStore.selected_KID);
                } else if (Util.arrayCompare(keyStore.selected_KID, (short) 0, keyStore.VUCA_Cert.CHR, (short) 0, KID_LENGTH) == 0) {
                    keyStore.VU_Cert.verifyCert(cert, keyStore.selectedPublicKey, keyStore.selected_KID);
                } else {
                    ISOException.throwIt(SW_CERT_VERIFICATION_FAILED); // Selected keyId, with MSE, is neither ERCA_KID nor VUCA_KID
            } else {
                ISOException.throwIt(SW_CERT_VERIFICATION_FAILED);
            return;
        private short processGetChallenge(APDU apdu, boolean protectedApdu) {
            byte[] buffer = apdu.getBuffer();
            byte p1 = (byte) (buffer[OFFSET_P1] & 0xff);
            byte p2 = (byte) (buffer[OFFSET_P2] & 0xff);
            if (p1 != 0 || p2 != 0) {
                ISOException.throwIt(SW_WRONG_P1P2);
            random.generateData(Rnd3, (short) 0, (short) 8);
            short Le = apdu.setOutgoing();
            if (Le != (short) 8) {
                ISOException.throwIt(SW_WRONG_LENGTH);
            Util.arrayCopyNonAtomic(Rnd3, (short) 0, buffer, (short) 0, (short) 8);
            return Le;
        private void processMSE(APDU apdu) {
            byte[] buffer = apdu.getBuffer();
            if (buffer[OFFSET_P1] == (byte) 0xC1 && buffer[OFFSET_P2] == P2_DST) {
                short lc = (short) (buffer[OFFSET_LC] & 0xFF);
                if (lc != (short) (KID_LENGTH + 2)) {
                    ISOException.throwIt(SW_WRONG_LENGTH);
                if (apdu.setIncomingAndReceive() != lc) {
                    ISOException.throwIt(ISO7816.SW_WRONG_DATA);
                if (buffer[OFFSET_CDATA] != (byte) 0x83) {//check the tag of the data
                    ISOException.throwIt(SW_SECURE_MESSAGING_DATA_OBJECTS_MISSING);
                } else if (buffer[OFFSET_CDATA + 1] != (byte) 0x08) {
                    ISOException.throwIt(SW_INCORRECT_DATA_OBJECT); // check if the key is already selected one
                } else if (Util.arrayCompare(buffer, (short) (OFFSET_CDATA + 2), keyStore.selected_KID, (short) 0, KID_LENGTH) != 0) {
                    if (Util.arrayCompare(buffer, (short) (OFFSET_CDATA + 2), keyStore.ERCA_KID, (short) 0, KID_LENGTH) == 0) {// KID is EUR_KID
                        keyStore.selected_KID = keyStore.ERCA_KID;
                        keyStore.selectedPublicKey = keyStore.eurPublicKey;
                        keyStore.Selected_Cert = null; // ERCA public key is selected
                        return;
                    } else if (Util.arrayCompare(buffer, (short) (OFFSET_CDATA + 2), keyStore.VUCA_Cert.CHR, (short) 0, KID_LENGTH) == 0) {// KID is MSCA_KID
                        keyStore.Selected_Cert = keyStore.VUCA_Cert;
                    } else if (Util.arrayCompare(buffer, (short) (OFFSET_CDATA + 2), keyStore.VU_Cert.CHR, (short) 0, KID_LENGTH) == 0) { // KID is VU_KID
                        keyStore.Selected_Cert = keyStore.VU_Cert;
                    } else {
                        ISOException.throwIt(SW_REFERENCE_DATA_NOT_FOUND);
                    }// KID not found
                    keyStore.selectedPublicKey = keyStore.Selected_Cert.publicKey;
                    keyStore.selected_KID = keyStore.Selected_Cert.CHR;
                } else { // if the KID is already set, just return
                    return;
            } else {
                ISOException.throwIt(ISO7816.SW_WRONG_P1P2);
        private void processSelectFile(APDU apdu) {
            byte[] buffer = apdu.getBuffer();
            short lc = (short) (buffer[OFFSET_LC] & 0x00FF);
            // retrieve p1p2 from apdu buffer
            byte p1 = buffer[OFFSET_P1];
            byte p2 = buffer[OFFSET_P2];
            short p1p2 = Util.makeShort(p1, p2);
            apdu.setIncomingAndReceive();
            if (p1 == 4) {
                if (lc == (short) TACHO_AID_LENGTH) {
                    if (Util.arrayCompare(buffer, (short) OFFSET_CDATA, TACHOGRAPH_AID, (short) 0, (short) TACHO_AID_LENGTH) == 0) {
                        selectedFile = fileSystem.getDT();
                        fileSystem.selectDT();
                        volatileState[0] |= FILE_SELECTED;
                        return;
                    } else {
                        ISOException.throwIt(ISO7816.SW_WRONG_DATA);
                } else if (lc != 2) {
                    ISOException.throwIt(SW_WRONG_LENGTH);
                short fid = Util.getShort(buffer, OFFSET_CDATA);
                if (fileSystem.getFile(fid) != null) {
                    selectedFile = fileSystem.getDT();
                    fileSystem.selectDT();
                    volatileState[0] |= FILE_SELECTED;
                    return;
            } else if (p1 == 2) {
                if (lc != 2) {
                    ISOException.throwIt(SW_WRONG_LENGTH);
                short fid = Util.getShort(buffer, OFFSET_CDATA);
                if (fileSystem.getFile(fid) != null) {
                    selectedFile = fileSystem.getFile(fid);
                    volatileState[0] |= FILE_SELECTED;
                    return;
            } else {
                ISOException.throwIt(ISO7816.SW_WRONG_P1P2);
            setNoFileSelected();
            ISOException.throwIt(ISO7816.SW_FILE_NOT_FOUND);
        public static void setNoFileSelected() {
            if (hasFileSelected()) {
                volatileState[0] ^= FILE_SELECTED;
        public static boolean hasFileSelected() {
            return (volatileState[0] & FILE_SELECTED) == FILE_SELECTED;
        public static boolean hasMutuallyAuthenticated() {
            return (volatileState[0] & MUTUAL_AUTHENTICATED) == MUTUAL_AUTHENTICATED;
        static boolean isLocked() {
            return (persistentState & LOCKED) == LOCKED;
        public boolean isSelectedFileEncrypted() {
            return ((selectedFile.getAccessConditions() & DigitalTachograph.ENCRYPTED) == DigitalTachograph.ENCRYPTED);
    }

  • Looking to extract position/coordinates from Simulated Starter Kit 2.0

    I am new to the Robotics Module of LabView so I wanted to clarify is either of things exist. The simulated DaNI (starter kit 2.0) moves depending on the speeds sent to the DC motors, but how/where is this translated into movement for the simulated DaNI? OR is there any way to put a marker or otherwise monitor the current position of the simulated DaNI in the simulated environment. (hopefully using coordinates or something similar?)
    I am only using the basic, nothing complex. Some code has been written to make inputs to the Write Dc Motor Setpoints VI and that is where the motor speed is inputted, but I cannot see where it actually translates into movement for the simulated DaNI.
    I don't need anything solved or fixed, would just appreciate a point in the right direction or a clarification.

    You may want to take a look at the "Starter Kit 2.0 Dead Reckoning" example to see how to directly access the position of the robot from the simulation environment. (If you don't have LabVIEW 2012 or later you can get the example here.)  In this case, you get a reference to the robot's "Body" object, then call the "Position" property to get the coordinates of the robot's center point within the simulation environment.  As for how the API controls the motors, the robot host interface contains references to the simulated motors, and it is sending position setpoints to the simulator through those references  This comminication is handled within Write DC Motor Setpoints.vi.  Meanwhile the simulator is calculating the friction and collisions between the wheels and the ground to make the robot move.
    Chris M

  • Bluetooth simulation between J2SE server and J2ME client

    hi there,
    I have a working bluetooth client/server application (using BlueCove), with the server on a PC (the PC has bluetooth hardware) and the client on a mobile telephone.
    I wish to move the application to a bluetooth simulated environment, however.
    To simulate bluetooth between 2 mobiles, I could open 2 instances of the WTK simulator and the mobiles will find each other -- but this doesn't meet my needs. I wish to simulate the bluetooth environment between a J2SE server and a J2ME client.
    Can I do this using the wireless toolkit? Does anyone have other ideas?
    thanks,
    Manoj

    OK - I have the solution.
    My PC (server) code used BlueCove to talk to the bluetooth stack. The trick is to use Sun's own KVM packages. This creates a virtual bluetooth device on your machine, shared by the WTK emulator.
    Here's the server code:
    package com.encube;
    import java.awt.BorderLayout;
    import java.io.InputStream;
    import javax.microedition.io.Connector;
    import javax.microedition.io.StreamConnection;
    import javax.microedition.io.StreamConnectionNotifier;
    import javax.swing.JFrame;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import com.sun.kvem.bluetooth.BluetoothStateException;
    import com.sun.kvem.bluetooth.DiscoveryAgent;
    import com.sun.kvem.bluetooth.LocalDevice;
    public class Server {
         public static final String UUID_STRING = "A781FDBA229B486A8C21CEBD00000000";
         public static final String SERVICE_NAME = "BTCHATSVR";
         private StreamConnectionNotifier server;
         JFrame jframe;
         JTextArea textArea;
         public static void main(String[] args) {
              Server svr = new Server();
              svr.doWork();
         public void doWork() {
              this.jframe = new JFrame("BT Server");
              this.jframe.setLayout(new BorderLayout());
              this.textArea = new JTextArea(6, 20);
              JScrollPane jsp = new JScrollPane(this.textArea);
              this.jframe.add(jsp, BorderLayout.CENTER);
              this.jframe.pack();
              this.jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.jframe.setVisible(true);
              startServer();
         public void logMessage(String message) {
              this.textArea.setText(this.textArea.getText() + message + "\n");
              this.textArea.setCaretPosition(this.textArea.getText().length());
         public void startServer() {
              LocalDevice local;
              try {
                   local = LocalDevice.getLocalDevice();
                   local.setDiscoverable(DiscoveryAgent.GIAC);
                   this.logMessage("max of "
                             + LocalDevice
                                       .getProperty("bluetooth.connected.devices.max")
                             + " connection(s) supported");
                   String url = "btspp://localhost:" + UUID_STRING + ";name="
                             + SERVICE_NAME;
                   server = (StreamConnectionNotifier) Connector.open(url);
                   this.logMessage("waiting for connection...");
                   StreamConnection conn = server.acceptAndOpen();
                   this.logMessage("connection opened");
                   InputStream is = conn.openInputStream();
                   byte buffer[] = new byte[1000];
                   while (true) {
                        int numChars = is.read(buffer);
                        String s = new String(buffer);
                        logMessage("received from mobile phone: " + s.substring(0, numChars));
              } catch (Exception e) {
                   this.logMessage(e.getMessage());
    }You need to include the location of WTK as the kvem.home define. If its installed in c:\wtk22 (the default), start the server with the parameter -Dkvem.home="c:\wtk22". You also need to include these 3 libraries:
    c:\wtk22\wtklib\gcf-op.jar
    c:\wtk22\wtklib\kenv.zip
    c:\wtk22\wtklib\kvem.jar
    That's it for the server. My code of the sample client (the mobile phone, running in the WTK emulator) is messy (sorry about that -- still cleaning it up)!
    import java.io.IOException;
    import java.io.OutputStream;
    import java.util.Enumeration;
    import java.util.Timer;
    import java.util.TimerTask;
    import java.util.Vector;
    import javax.bluetooth.BluetoothStateException;
    import javax.bluetooth.DeviceClass;
    import javax.bluetooth.DiscoveryAgent;
    import javax.bluetooth.DiscoveryListener;
    import javax.bluetooth.LocalDevice;
    import javax.bluetooth.RemoteDevice;
    import javax.bluetooth.ServiceRecord;
    import javax.bluetooth.UUID;
    import javax.microedition.io.Connector;
    import javax.microedition.io.StreamConnection;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.StringItem;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    public class MainMIDlet extends MIDlet {
         protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
              // TODO Auto-generated method stub
         protected void pauseApp() {
              // TODO Auto-generated method stub
         protected void startApp() throws MIDletStateChangeException {
              MainForm mainForm = new MainForm();
              Display.getDisplay(this).setCurrent(mainForm);
              mainForm.initializeDisplay();
    class MainForm extends Form {
         public static final String UUID_STRING = "A781FDBA229B486A8C21CEBD00000000";
         private StringItem log;
         private DiscoveryAgent agent;
         Object lock = new Object();
         static EndPoint currentEndPoint;
         static Vector serviceRecords = new Vector();
         public MainForm() {
              super("BT Client");
         public void initializeDisplay() {
              this.log = new StringItem("", "");
              this.append(this.log);
              try {
                   LocalDevice local = LocalDevice.getLocalDevice();
                   agent = local.getDiscoveryAgent();
                   agent.startInquiry(DiscoveryAgent.GIAC, new Listener(this, agent));
              } catch (BluetoothStateException e) {
                   this.logMessage(e.getMessage());
         public void logMessage(String message) {
              this.log.setText(this.log.getText() + message + "\n");
         public void processServiceRecord(ServiceRecord sr) {
              try {
                   String url = sr.getConnectionURL(
                             ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
                   logMessage("opening URL " + url);
                   StreamConnection conn = (StreamConnection) Connector.open(url);
                   OutputStream os = conn.openOutputStream();
                   String smessage = "test message from phone emulator";
                   os.write(smessage.getBytes());
              } catch (IOException e) {
                   logMessage("error while processing service record: "
                             + e.getMessage());
         class Listener implements DiscoveryListener {
              private MainForm mainForm;
              private Vector pendingEndPoints;
              private DiscoveryAgent agent;
              public Listener(MainForm mainForm, DiscoveryAgent agent) {
                   this.mainForm = mainForm;
                   this.agent = agent;
                   this.pendingEndPoints = new Vector();
              public void deviceDiscovered(RemoteDevice dev, DeviceClass deviceClass) {
                   this.mainForm.logMessage("found device");
                   this.pendingEndPoints.addElement(new EndPoint(dev));
              public void inquiryCompleted(int arg0) {
                   this.mainForm.logMessage("done searching for devices");
                   for (Enumeration enm = this.pendingEndPoints.elements(); enm
                             .hasMoreElements();) {
                        EndPoint ep = (EndPoint) enm.nextElement();
                        ep.calculateRemoteName();
                        this.mainForm.logMessage("device name: " + ep.getRemoteName());
                   new Timer().schedule(new DoServiceDiscovery(), 100);
              public void servicesDiscovered(int transID, ServiceRecord[] arg1) {
                   mainForm.logMessage("found " + arg1.length
                             + " service(s) on device "
                             + currentEndPoint.getRemoteName());
                   for (int i = 0; i < arg1.length; i++) {
                        serviceRecords.addElement(arg1);
              public void serviceSearchCompleted(int arg0, int arg1) {
                   synchronized (lock) {
                        * unlock to proceed to service search on next device see
                        * DoServiceDiscovery.run()
                        lock.notifyAll();
                   mainForm.logMessage("done searching for services on "
                             + currentEndPoint.getRemoteName());
              * Inner class. Called a short time after the last device is found.
              class DoServiceDiscovery extends TimerTask {
                   public void run() {
                        try {
                             UUID uuids[] = new UUID[2];
                             * ok, we are interesting in btspp services only and only
                             * known ones -- check for our UUID
                             uuids[0] = new UUID(0x1101);
                             uuids[1] = new UUID(MainForm.UUID_STRING, false);
                             for (Enumeration enm = pendingEndPoints.elements(); enm
                                       .hasMoreElements();) {
                                  EndPoint ep = (EndPoint) enm.nextElement();
                                  mainForm.logMessage("searching for services on "
                                            + ep.getRemoteName());
                                  currentEndPoint = ep;
                                  ep.transId = agent.searchServices(null, uuids,
                                            ep.remoteDev, new Listener(mainForm, agent));
                                  synchronized (lock) {
                                       try {
                                            lock.wait();
                                       } catch (InterruptedException e) {
                                            // do nothing
                                            mainForm.logMessage("exception while waiting: "
                                                      + e.getMessage());
                             mainForm.logMessage("discovered all services; found "
                                       + serviceRecords.size() + " record(s)");
                             * assume we have just 1 service record
                             if (serviceRecords.size() > 0) {
                                  processServiceRecord((ServiceRecord) serviceRecords
                                            .elementAt(0));
                        } catch (Exception e) {
                             mainForm.logMessage("error during service discovery: "
                                       + e.getMessage());
    class MiscUtils {
         * Get the friendly name for a remote device. On the Nokia 6600, we're able
         * to get the friendlyname while doing device discovery, but on the Nokia
         * 6230i, an exception is thrown. On the 6230i, we get the friendly name
         * only after all devices have been discovered -- when the callback
         * inquiryCompleted is called.
         * @param dev
         * the device to examine
         * @return a friendly name for the device, otherwise the IP address as a
         * hex-string
         public static String getDeviceName(RemoteDevice dev) {
              String devName;
              try {
                   devName = dev.getFriendlyName(false);
              } catch (IOException e) {
                   devName = dev.getBluetoothAddress();
              return devName;
         public static EndPoint findEndPointByTransId(Vector endpoints, int id) {
              for (int i = 0; i < endpoints.size(); i++) {
                   EndPoint endpt = (EndPoint) endpoints.elementAt(i);
                   if (endpt.getTransId() == id) {
                        return endpt;
              return null; // not found, return null
    class EndPoint {
         // remote device object
         RemoteDevice remoteDev;
         // remote device class
         DeviceClass remoteClass;
         // remote service URL
         String remoteUrl;
         // service hosted on this device -- populated after searching for devices
         ServiceRecord serviceRecord;
         // bluetooth discovery transId, obtainsed from searchServices
         int transId = -1; // -1 must be used for default. cannot use 0
         // local user nick name
         String localName;
         // remote user nick name
         String remoteName;
         // vector of ChatPacket pending to be sent to remote service.
         // when message is sent, it is removed from the vector.
         Vector msgs = new Vector();
         public EndPoint(RemoteDevice rdev) {
              remoteDev = rdev;
         * This functionality isn't called in the constructor because we cannot
         * retrieve the friendly name while searching for devices on all phones. On
         * some phones we have to wait until after devices have been discovered.
         public void calculateRemoteName() {
              this.remoteName = MiscUtils.getDeviceName(this.remoteDev);
         public RemoteDevice getRemoteDev() {
              return remoteDev;
         public String getRemoteName() {
              return remoteName;
         public ServiceRecord getServiceRecord() {
              return serviceRecord;
         public void setServiceRecord(ServiceRecord serviceRecord) {
              this.serviceRecord = serviceRecord;
         public int getTransId() {
              return transId;
    ...and that's it. Start the server, then the client (all on the same machine) and you've simulated bluetooth between the 2.
    To get the server working with a real mobile, you'll need to use the BlueCove library instead of the 3 WTK jars (and can remove the kvem.home directive as well). The rest of the code should remain the same (haven't quite tested that yet!).
    cheers
    Manoj
    null

  • Using simulations for online control?

    Hi
    When using Labview 8.2.1 what is the best way of implementing model based control, can the simulation environment, which has some nice transferfunction features be synchronized in a timed loop, to do online control in a real time system. I couldn't find an input in the simulation loop triggering the simulation with the timed loop rate. An example would be nice. Also is it at all possible to change integration algorithms, or should I make the desired adjustments myself.
    Best Regards
    soeren  

    Hi soeren
    1) If you double click the simulation loop and choose the 'Timing Parameters' tab, you have to check the 'Synchronize loop to timing source' box.
    Then if you expand the inputs on the left hand side loop you will see the 'Source Name' appearing. This is where you can wire in an external timing source.
    2) Create a timing source and wire it to the inputs of the timed and the simulated loop that you want to sync. The timing source can be the 1KHz clock Windows use
    or the 1MHz clock that can be found in the latest NI Real time controllers.
    3) Determine the rate at which the loops will run. The simulation rate has to be expressed in seconds and the timed loop rate will be in ticks ( for a 1KHz source the tick will be 1 msec). The photos attached depict two loops that are synchronized to run every 10msec. Please note that you need to choose a Fixed step solver from the simulation loop configuration box.
    With regard to the integration block, it's behavior will depend on the ODE ( Ordinary Differential Equation) solver you choose. Therefore, you can play around with the simulation loop parameters to find out which method gives you the most meaningful results.
    I hope that helped,
    Kostas
    Attachments:
    SimulationTiming.PNG ‏26 KB
    Sync_Timed_Sim.PNG ‏20 KB

  • Reproduction of Simulation Interface Toolkit example

    Hallo everyone,
    in trying to reproduce the example found in the Simulation Interface Toolkit How-To I am facing an error with LabVIEW 2009.
    I have succesfully created a host-VI working with the Simulink .mdl-file on localhost as Simulation Environment which runs well.
    And I can succesfully compile the desired .dll-file (sinewave.dll) with Simulink and nidll.tlc.
    But if I want to use a cRio-9024 as Real Time-Target with FPGA-Interface I get the following error when I start the Host-VI:
    <<<
    Missing Simulation Model File
    The simulation file sinewave.out couldn't be found in the expected paths. Please FTP the file manually to your Real-Time system.
    The following expected paths do not contain the simulation model:
    C:\[...]\sinewave_nidll_vxworks_rtw\sinewave.out
    C:\[...]\sinewave_nidll_rtw\sinewave.out
    >>>
    This is the resulting deployment status:
    <<<
    Initializing...
    Calculating dependencies...
    Checking items for conflicts. This operation could take a while...
    Preparing items for download. This operation could take a while...
    Deploying NI_FileType.lvlib
    Deploying NI_SIT_util.lvlib
    Deploying NI_LVConfig.lvlib
    Deploying NI_SIT_Replay.lvlib
    Deploying XDNodeRunTimeDep.lvlib
    Deploying NI_SIT_Data Log.lvlib
    Deploying NI_SIT_SITServer.lvlib
    Deploying NI_SIT_driversupportVIs.lvlib
    Deploying NI_SIT_ClientConnMngr.lvlib
    Deploying NI_SIT_sitctls.lvlib
    Deploying sinewave_Driver.lvproj
    Deploying NI-Mess-Fix(successfully deployed target settings)
    Deploying NI_SIT_Data Log.lvlib:Expand Signal Name.vi (7,85 K)
    Deploying NI_SIT_Data Log.lvlib:Get Group Number.vi (4,46 K)
    Deploying Set Bold Text.vi (11,92 K)
    Deploying whitespace.ctl (2,09 K)
    Deploying Set String Value.vi (5,06 K)
    Deploying NI_SIT_Replay.lvlib:Wait for Ack.vi (5,50 K)
    Deploying NI_SIT_driversupportVIs.lvlibIT Driver FP Strings.vi (2,31 K)
    Deploying NI_SIT_driversupportVIs.lvlibIT Server Command.ctl (2,09 K)
    Deploying NI_SIT_Data Log.lvlib:Enable Disable GPL Item.vi (13,12 K)
    Deploying NI_SIT_Data Log.lvlibet Group Probe List Enabled Groups.vi (9,54 K)
    Deploying NI_SIT_Data Log.lvlibet Group Probe List Logging Enabled State.vi (7,41 K)
    Deploying NI_SIT_driversupportVIs.lvlibIT Timing Src.viNI_SIT_driversupportVIs.lvlibIT Timing Src.vi loaded with errors on the target and was closed.
    LabVIEW:  Failed to load shared library SIT_TimingInterface.*IT_InitTimingSrc:C on RT target device.
    LabVIEW:  Failed to load shared library SIT_TimingInterface.*IT_GenerateOneTick:C on RT target device.
    LabVIEW:  Failed to load shared library SIT_TimingInterface.*IT_ClearTimingSrc:C on RT target device.
    Deploying NI-Mess-Fix Container
    Deployment completed with errors
    >>>
    Why should I produce a file called sinewave.out? I don't think I really need it.
    Can anyone please tell me how to employ the sinewave.dll properly so that it works on my cRio?
    (I don't want to use hardware I/Os yet, just run the .dll on the cRio.)
    The best help for would be a step-by-step description coming from a working VI which uses sinewave.mdl inside LabVIEW and having sinewave.dll ready for use.
    Must I consider any other document to be able to finish this example?
    Thanks for your effort!
    Solved!
    Go to Solution.

    Hallo Marco,
    thanks for your advice. I will give your hint a try.
    But I wonder why I need an .out-file? Is the cRio 9024 device a VxWorks-based target?
    Thanks for your help!
    Jan

  • App runs fine in simulator but fails on iPad

    My app has been running fine in the simulator environment but tried running for the first time on an iPad.  It loads the first screen (which is a table view) but if I try to do anything, including just scrolling the table, it crashes.  The Xcode organiser shows the following:
    >
    Aug 11 17:24:29 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created
    Aug 11 17:24:29 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilephone[0xd6d9]) Exited: Killed: 9
    Aug 11 17:24:29 unknown SpringBoard[15] <Warning>: Application 'FaceTime' exited abnormally with signal 9: Killed: 9
    Aug 11 17:24:29 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.andion.TKD[0x6992]) Exited: Killed: 9
    Aug 11 17:24:29 unknown ReportCrash[1286] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-08-11-172429.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
    Aug 11 17:24:29 unknown SpringBoard[15] <Warning>: Application 'TKD' exited abnormally with signal 9: Killed: 9
    > >
    If I look in the crash logs in organiser all I can see is one from Safari dated weeks ago.  How do I find the log referred to in the message above?
    The app (TKD) is 16MB and the iPad reports 26GB available, so although there appears to be a reference to LowMemory, surely that isn't actually the problem?   Am I doing something which is impacting FaceTime and why is there a message about com.apple.mobilephone on an iPad?  Am I doing something horribly wrong?
    Any help much appreciated!

    'killed' typically means the app was unresponsive just long enough for the OS to take action.
    You should be able to see something in Xcode's console during debugging on the device.
    Ken

  • Extract Single Tone Information - phase step

    Hello!
    I am using Extract Single Tone Information to measure amplitude, frequency and phase of a slowly varying signal.
    But sometimes the phase jumps ~350 degrees for no apparent reason. I have made a small vi (in LabView 8.5 professional) to demonstrate this, see attachment.
    Seems like the shift occurs when the ends of the input signal cross each others level, in opposite directions.
    Guess I should start looking for an alternative method for doing the measurements.
    Any suggestions or ideas are most welcome.
    Attachments:
    phase_test.vi ‏30 KB

    Hi Thomas
    It jumps 360 degrees to be exact. -180 degrees and +180 degrees is basically the same thing so the phase you are seeing is correct. It does not look very good in a chart though. To improve the looks you can use the subVI called "Unwrap phase".
    Regards
    Øyvind Ø 

  • Online Rebuild Index Vs Shrinking With Compact Segment with Release space

    Hi All,
    I want to know which is the better option from these as far as availabiltiy of index
    is concerned
    I have been doing online INdex rebuild and haven't faced much problems but new to Shrinking
    What Grid COntrol says about shrinking is
    "This will first compact the segments and then release the recovered space to the tablespace.
    During the short space release phase, any cursors referencing this segment may be
    invalidated and queries on the segment could be affected"
    I dont know how much is that affect...Can anybody share their experience and knowledge
    about shrinking .....
    My Idea is to reclaim the space from the INdexes
    Thanks
    Gagan

    It depends on many factors of which you have mentioned none.
    The affect of cursor invalidation, for example, might be different on Monday than on Tuesday.
    You should test this in as real a simulated environment as you can but likely any issues will be minimal.
    Just don't be surprised by a surprise or two.

  • Wrong results using the SUM in XPATH- Edit data

    I have a problem when try to do a sum operation using the XPATH function on a set of decimal values:
    To explain it simple, a Service script(also have tried in BPA) which has a edit data step as below
    move '2108.39' to "parm/+listofpay/amt";
    move '1330.8' to "parm/+listofpay/amt";
    move '189.83' to "parm/+listofpay/amt";
    move '4561.12' to "parm/+listofpay/amt";
    move '480.55' to "parm/+listofpay/amt";
    move "sum(parm/listofpay/amt)" to "parm/totamt";
    and the schema is
    <schema>
    <totamt dataType="number"/>
    <listofpay type="list">
    <amt dataType="number"/>
    </listofpay>
    </schema>
    When tried to display(calling through a BPA) the parm/totamt i get a result 8670.68999999999 instead of 8670.69
    Oracle support says it a problem with rounding, how can we have a rounding problem in addition ?
    any suggestions please ?

    Hi Manfred!
    Our setup is very straight forward. We are using a generic M-Series board to generate the stimulus signal as follows:
    Output frequency for x-number of cycles - measure gain/phase response.
    To sample the response, we are using an S-Series board. All of it is done using DAQmx drivers, which again, I don't think makes any difference, since we are experiencing the same problems with a 'pure' software simulation.
    Our unit under test is comprised of a resistor and a capacitor, which represents a simple low pass filter with predictable gain/phase response.
    It appears to us that the erratic phase response at higher frequencies is a result of 1pi versus 2pi phase wrap or flip, which may not be handled correctly by the lock-in tool kit.
    We were thinking of "unwrapping" the phase, but I wanted to find an explanation for this behaviour first, to ensure that we are not dealing with a software bug.
    Also, where can we find the unwrap phase.vi?
    Thanks,
    Markus
    www.movimed.com - Custom Imaging Solutions
    www.movitherm.com - Advanced Thermography Solutions

  • SAP R/3 implementation methodologies

    Hi,
    Can any one send me SAP R/3 implementation methodologies Documents and links.
    Thanks & Regards,
    Ram

    hi,
    1
    SAP R/3 Implementation
    at Geneva Pharmaceuticals1
    Company Background
    Geneva Pharmaceuticals, Inc., one of the world’s largest generic drug manufacturers, is the North
    American hub for the Generics division of Swiss pharmaceutical and life sciences company Novartis
    International AG. Originally founded by Detroit pharmacist Stanley Tutag in 1946, Geneva moved
    its headquarters to Broomfield, Colorado in 1974. The company was subsequently acquired by Ciba
    Corporation in 1979, which in 1996, merged with Sandoz Ltd. in the largest ever healthcare merger to
    form Novartis. Alex Krauer, Chairman of Novartis and former Chairman and CEO of Ciba,
    commented on the strengths of the merger:
    “Strategically, the new company moves into a worldwide leadership position in life
    sciences. Novartis holds the number two position in pharmaceuticals,
    number one in crop protection, and has tremendous development potential in
    nutrition.”
    The name “Novartis” comes from the Latin term novae artes or new arts, which eloquently captures
    the company’s corporate vision: “to develop new skills in the science of life.” Novartis inherited,
    from its parent companies, a 200-year heritage of serving consumers in three core business segments:
    healthcare, agribusiness, and nutrition. Business units organized under these divisions are listed in
    Exhibit 1. Today, the Basel (Switzerland) based life sciences company employs 82,500 employees
    worldwide, runs 275 affiliate operations in 142 countries, and generates annual revenues of 32 billion
    Swiss Francs. Novartis’ key financial data for the last five years (1994-98) are presented in Exhibit 2.
    The company’s American Depository Receipts trade on the New York Stock Exchange under the
    ticker symbol NVTSY.
    Novartis’ global leadership in branded pharmaceuticals is complemented by its generic drugs
    division, Novartis Generics. This division is headquartered in Kundl (Austria), and its U.S.
    operations are managed by Geneva Pharmaceuticals. In 1998, Geneva had revenues of $300 million,
    employed nearly 1000 employees, and manufactured over 4.6 billion dosage units of generic drugs.
    1 This “freeware” case was written by Dr. Anol Bhattacherjee to serve as a basis for class discussion rather than
    to demonstrate the effective or ineffective handling of an administrative or business situation. The author is
    grateful to Randy Weldon, CIO of Geneva Pharmaceuticals, and his coworkers for their unfailing help
    throughout the course of this project. This case can be downloaded and distributed free of charge for non-profit
    or academic use, provided the contents are unchanged and this copyright notice is clearly displayed. No part of
    this case can be used by for-profit organizations without the express written consent of the author. This case
    also cannot be archived on any web site that requires payment for access. Copyright © 1999 by Anol
    Bhattacherjee. All rights reserved.
    ERP Implementation at Geneva Pharmaceuticals 2
    Geneva portfolio currently includes over 200 products in over 500 package sizes, covering a wide
    range of therapeutic categories, such as nervous system disorders, cardio-vascular therapies, and
    nonsteroidal anti-inflammatory drugs. Its major products include ranitidine, atenolol, diclofenac
    sodium, ercaf, metoprolol tartrate, triamterene with hydrochlorothiazide, and trifluoperazine.
    Geneva’s business and product information can be obtained from the company web site at
    www.genevaRx.com.
    Generic drugs are pharmaceutically and therapeutically equivalent versions of brand name drugs with
    established safety and efficacy. For instance, acetaminophen is the equivalent of the registered brand
    name drug Tylenolâ, aspirin is equivalent of Ecotrinâ, and ranitidine HCl is equivalent of Zantacâ.
    This equivalence is tested and certified within the U.S. by the Food and Drug Administration (FDA),
    following successful completion of a “bioequivalence study,” in which the blood plasma levels of the
    active generic drug in healthy people are compared with that of the corresponding branded drug.
    Geneva’s business strategy has emphasized growth in two ways: (1) focused growth over a select
    range of product types, and (2) growth via acquisitions. Internal growth was 14 percent in 1998,
    primarily due to vigorous growth in the penicillin and cephalosporin businesses. In pursuit of further
    growth, Geneva spend $52 million in 1997 to upgrade its annual manufacturing capacity to its current
    capacity of 6 billion units, and another $23 million in 1998 in clinical trials and new product
    development.
    Industry and Competitive Position
    The generic drug manufacturing industry is fragmented and highly competitive. In 1998, Geneva was
    the fifth largest player in this industry, up from its eighth rank in 1997 but still below its second rank
    in 1996. The company’s prime competitors fall into three broad categories: (1) generic drugs
    divisions of major branded drug companies (e.g., Warrick – a division of Schering-Plough and
    Apothecon – a division of Bristol Myers Squibb), (2) independent generic drug manufacturers (e.g.,
    Mylan, Teva Pharmaceuticals, Barr Laboratories, and Watson Pharmaceuticals), and (3) drug
    distributors vertically integrating into generics manufacturing (e.g., AndRx). The industry also has
    about 200 smaller players specializing in the manufacture of niche generic products. While Geneva
    benefited from the financial strength of Novartis, independent companies typically used public stock
    markets for funding their growth strategies.
    In 1998, about 45 percent of prescriptions for medications in the U.S. were filled with generics. The
    trend toward generics can be attributed to the growth of managed care providers such as health
    maintenance organizations (HMO), who generally prefer lower cost generic drugs to more expensive
    brand name alternatives (generic drugs typically cost 30-50 less than equivalent brands). However,
    no single generics manufacturer has benefited from this trend, because distributors and pharmacies
    view generic products from different manufacturers as identical substitutes and tend to
    “autosubstitute” or freely replace generics from one company with those from another based on
    product availability and pricing at that time. Once substituted, it is very difficult to regain that
    customer account because pharmacies are disinclined to change product brand, color, and packaging,
    to avoid confusion among consumers. In addition, consumer trust toward generics has remained
    lower, following a generic drug scandal in the early 1990’s (of which Geneva was not a part).
    ERP Implementation at Geneva Pharmaceuticals 3
    Margins in the generics sector has therefore remained extremely low, and there is a continuous
    pressure on Geneva and its competitors to reduce costs of operations.
    Opportunities for international growth are limited because of two reasons. First, consumers in some
    countries such as Mexico are generally skeptical about the lack of branding because of their cultural
    background. Second, U.S. generics manufacturers are often undercut by competitors from India and
    China, where abundance of low-cost labor and less restrictive regulatory requirements (e.g., FDA
    approval) makes drug manufacturing even less expensive.
    Continuous price pressures has resulted in a number of recent industry mergers and acquisitions in the
    generic drugs sector in recent years, as the acquirers seek economies of scale as a means of reducing
    costs. The search for higher margins has also led some generics companies to venture into the
    branded drugs sector, providing clinical trials, research and development, and additional
    manufacturing capacity for branded drugs on an outsourced basis.
    Major Business Processes
    Geneva’s primary business processes are manufacturing and distribution. The company’s
    manufacturing operations are performed at a 600,000 square foot facility in Broomfield (Colorado),
    while its two large distribution centers are located in Broomfield and Knoxville (Tennessee).
    Geneva’s manufacturing process is scientific, controlled, and highly precise. A long and rigorous
    FDA approval process is required prior to commercial production of any drug, whereby the exact
    formulation of the drug or its “recipe” is documented. Raw materials are sourced from suppliers
    (sometimes from foreign countries such as China), tested for quality (per FDA requirements),
    weighed (based on dosage requirements), granulated (i.e., mixed, wetted, dried, milled to specific
    particle sizes, and blended to assure content uniformity), and compressed into a tablet or poured into a
    gelatinous capsule. Some products require additional coatings to help in digestion, stabilizing,
    regulating the release of active ingredients in the human body, or simply to improve taste. Tablets or
    capsules are then imprinted with the Geneva logo and a product identification number. Following a
    final inspection, the medications are packaged in childproof bottles with a distinctive Geneva label, or
    inserted into unit-dose blister packs for shipment.
    Manufacturing is done in batches, however, the same batch can be split into multiple product types
    such as tablets and capsules, or tablets of different dosages (e.g., 50 mg and 100 mg). Likewise,
    finished goods from a batch can be packaged in different types of bottles, based on customer needs.
    These variations add several layers of complexity to the standard manufacturing process and requires
    tracking of three types of inventory: raw materials, bulk materials, and finished goods, where bulk
    materials represent the intermediate stage prior to packaging. In some cases, additional intermediates
    such as coating solution is also tracked. Master production scheduling is focused on the manufacture
    of bulk materials, based on forecasted demand and replenishment of “safety stocks” at the two
    distribution centers. Finished goods production depends on the schedule-to-performance, plus
    availability of packaging materials (bottles and blister packs), which are sourced from outside
    vendors.
    ERP Implementation at Geneva Pharmaceuticals 4
    Bulk materials and finished goods are warehoused in Broomfield and Knoxville distribution centers
    (DC) prior to shipping. Since all manufacturing is done was done at Broomfield, inventory
    replenishment of manufactured products is done first at Broomfield and then at Knoxville. To meet
    additional customer demand, Geneva also purchases finished goods from smaller manufacturers, who
    manufacture and package generic drugs under Geneva’s level. Since most of these outsourcers are
    located along the east coast, and hence, they are distributed first to the Knoxville and then to
    Broomfield. Purchasing is simpler than manufacturing because it requires no bill of materials, no
    bulk materials management, and no master scheduling; Geneva simply converts planned orders to
    purchase requisitions, and then to purchase orders, that are invoiced upon delivery. However, the
    dual role of manufacturing and purchasing is a difficult balancing task, as explained by Joe Camargo,
    Director of Purchasing and Procurement:
    “Often times, we are dealing with more than a few decision variables. We have to
    look at our forecasts, safety stocks, inventory on hand, and generate a replenishment
    plan. Now we don’t want to stock too much of a finished good inventory because that
    will drive up our inventory holding costs. We tend to be a little more generous on the
    raw materials side, since they are less costly than finished goods and have longer
    shop lives. We also have to factor in packaging considerations, since we have a
    pretty short lead time on packaging materials, and capacity planning, to make sure
    that we are making efficient use of our available capacity. The entire process is
    partly automated and partly manual, and often times we are using our own
    experience and intuition as much as hard data to make a good business decision.”
    Geneva supplies to a total of about 250 customers, including distributors (e.g., McKesson, Cardinal,
    Bergen), drugstore chains (e.g., Walgreen, Rite-Aid), grocery chains with in-store pharmacies (e.g.,
    Safeway, Kroger), mail order pharmacies (e.g., Medco, Walgreen), HMOs (e.g., Pacificare, Cigna),
    hospitals (e.g., Columbia, St. Luke’s), independent retail pharmacies, and governmental agencies
    (e.g., U.S. Army, Veterans Administration, Federal prisons). About 70 percent of Geneva’s sales
    goes to distributors, another 20 percent goes to drugstore chains, while HMOs, government, retail
    pharmacies, and others account for the remaining 10 percent. Distributors purchase generic drugs
    wholesale from Geneva, and then resell them to retail and mail order pharmacies, who are sometimes
    direct customers of Geneva. The volume and dollar amount of transaction vary greatly from one
    customer to another, and while distributors are sometimes allow Geneva some lead time to fulfill in a
    large order, retail pharmacies typically are unwilling to make that concession.
    One emerging potential customer segment is Internet-based drug retailers such as Drugstore.com and
    PlanetRx.com. These online drugstores do not maintain any inventory of their own, but instead
    accept customer orders and pass on those orders to any wholesaler or manufacturer that can fill those
    orders in short notice. These small, customized, and unpredictable orders do not fit well with
    Geneva’s wholesale, high-volume production strategy, and hence, the company has decided against
    direct retailing to consumers via mail order or the Internet, at least for the near future.
    As is standard in the generics industry, Geneva uses a complex incentive system consisting of
    “rebates” and “chargebacks” to entice distributors and pharmacies to buy its products. Each drug is
    assigned a “published industry price” by industry associations, but Geneva rebates that price to
    distributors on their sales contracts. For instance, if the published price is $10, and the rebates
    assigned to a distributor is $3, then the contract price on that drug is $7. Rebate amounts are
    ERP Implementation at Geneva Pharmaceuticals 5
    determined by the sales management based on negotiations with customers. Often times, customers
    get proposals to buy the product cheaper from a different manufacturer and ask Geneva for a
    corresponding discount. Depending on how badly Geneva wants that particular customer or push that
    product, it may offer a rebate or increase an existing rebate. Rebates can vary from one product to
    another (for the same customer) and/or from one order volume to another (for the same product).
    Likewise, pharmacies ordering Geneva’s products are paid back a fraction of the sales proceeds as
    chargebacks.
    The majority of Geneva’s orders come through EDI. These orders are passed though multiple filters
    in an automated order processing system to check if the customer has an active customer number and
    sufficient credit, if the item ordered is correct and available in inventory. Customers are then
    assigned to either the Broomfield or Knoxville DC based on quantity ordered, delivery expiration
    dates, and whether the customer would accept split lots. If the quantity ordered is not available at the
    primary DC (say, Knoxville), a second allocation is made to the secondary DC (Broomfield, in this
    case). If the order cannot be filled immediately, a backorder will be generated and the Broomfield
    manufacturing unit informed of the same. Once filled, the distribution unit will print the order and
    ship it to the customer, and send order information to accounts receivable for invoicing. The overall
    effectiveness of the fulfillment process is measured by two customer service metrics: (1) the ratio
    between the number of lines on the order that can be filled immediately (partial fills allowed) to the
    total number of lines ordered by the customer (called “firstfill”), and (2) the percentage of items send
    from the primary DC. Fill patterns are important because customers typically prefer to get all items
    ordered in one shipment.
    Matching customer demand to production schedules is often difficult because of speculative buying
    on the part of customers. Prices of drugs are typically reassessed at the start of every fiscal year, and
    a distributor may place a very large order at the end of the previous year to escape a potential price
    increase at the start of the next year (these products would then be stockpiled for reselling at higher
    prices next year). Likewise, a distributor may place a large order at the end of its financial year to
    transfer cash-on-hand to cost-of-goods-sold, for tax purposes or to ward off a potential acquisition
    threat. Unfortunately, most generics companies do not have the built-in capacity to deliver such
    orders within short time frames, yet inability to fulfill orders may lead to the loss of an important
    customer. Safety stocks help meet some of these unforeseen demands, however maintaining such
    inventory consumes operating resources and reduce margins further.
    SAP R/3 Implementation
    Up until 1996, Geneva’s information systems (IS) consisted of a wide array of software programs for
    running procurement, manufacturing, accounting, sales, and other mission-critical processes. The
    primary hardware platform was IBM AS/400, running multiple operational databases (mostly DB/2)
    and connected to desktop microcomputers via a token-ring local area network (LAN). Each business
    unit had deployed applications in an ad hoc manner to meet its immediate needs, which were
    incompatible across business units. For instance, the manufacturing unit (e.g., materials requirements
    planning) utilized a manufacturing application called MacPac, financial accounting used
    Software/2000, and planning/budgeting used FYI-Planner. These systems were not interoperable,
    and data that were shared across systems (e.g., accounts receivable data was used by order
    ERP Implementation at Geneva Pharmaceuticals 6
    management and financial accounting packages, customer demand was used in both sales and
    manufacturing systems) had to be double-booked and rekeyed manually. This led to higher incidence
    of data entry errors, higher costs of error processing, and greater data inconsistency. Further, data
    was locked within “functional silos” and were unable to support processes that cut across multiple
    business units (e.g., end-to-end supply chain management). It was apparent that a common,
    integrated company-wide solution would not only improve data consistency and accuracy, but also
    reduce system maintenance costs (e.g., data reentry and error correction) and enable implementation
    of new value-added processes across business units.
    In view of these limitations, in 1996, corporate management at Geneva initiated a search for
    technology solutions that could streamline its internal processes, lower costs of operations, and
    strategically position the company to take advantage of new value-added processes. More
    specifically, it wanted an enterprise resource planning (ERP) software that could: (1) implement best
    practices in business processes, (2) provide operational efficiency by integrating data across business
    units, (3) reduce errors due to incorrect keying or rekeying of data, (4) reduce system maintenance
    costs by standardizing business data, (5) be flexible enough to integrate with new systems (as more
    companies are acquired), (6) support growth in product and customer categories, and (7) is Y2K (year
    2000) compliant. The worldwide divisions of Novartis were considering two ERP packages at that
    time: BPCS from Software Systems Associates and R/3 system from SAP. Eventually, branded drug
    divisions decided to standardize their data processing environment using BPCS, and generics agreed
    on deploying R/3.2 A brief description of the R/3 software is provided in the appendix.
    R/3 implementation at Geneva was planned in three phases (see Exhibit 3). Phase I focused on the
    supply side processes (e.g., manufacturing requirements planning, procurement planning), Phase II
    was concerned with demand side processes (e.g., order management, customer service), and the final
    phase was aimed at integrating supply side and demand side processes (e.g., supply chain
    management). Randy Weldon, Geneva’s Chief Information Officer, outlined the goals of each phase
    as:
    “In Phase I, we were trying to get better performance-to-master production schedule
    and maybe reduce our cost of operations. Our Phase II goals are to improve sales
    and operations planning, and as a result, reduce back orders and improve customer
    service. In Phase III, we hope to provide end-to-end supply chain integration, so that
    we can dynamically alter our production schedules to fluctuating demands from our
    customers.”
    For each phase, specific R/3 modules were identified for implementation. These modules along with
    implementation timelines are listed in Exhibit 3. The three phases are described in detail next.
    2 However, each generics subsidiary had its own SAP R/3 implementation, and therefore data sharing across
    these divisions remained problematic.
    ERP Implementation at Geneva Pharmaceuticals 7
    Phase I: Supply Side Processes
    The first phase of R/3 implementation started on November 1, 1997 with the goal of migrating all
    supply-side processes, such as purchasing management, capacity planning, master scheduling,
    inventory management, quality control, and accounts payable from diverse hardware/software
    platforms to a unified R/3 environment. These supply processes were previously very manual and
    labor intensive. A Macpac package running on an IBM AS/400 machine was used to control shop
    floor operations, prepare master schedules, and perform maintenance management. However, the
    system did not have simulation capability to run alternate production plans against the master
    schedule, and was therefore not used for estimation. The system also did not support a formal process
    for distribution resource planning (DRP), instead generated a simple replenishment schedule based on
    predefined economic order quantities. Materials requirements planning (MRP) was only partially
    supported in that the system generated production requirements and master schedule but did not
    support planned orders (e.g., generating planned orders, checking items in planned orders against the
    inventory or production plan, converting planned orders to purchase orders or manufacturing orders).
    Consequently, entering planned orders, checking for errors, and performing order conversion were all
    entered manually, item by item, by different sales personnel (which left room for rekeying error).
    Macpac did have a capacity resource planning (CRP) functionality, but this feature was not used since
    it required heavy custom programming and major enhancements to master data. The system had
    already been so heavily customized over the years, that even a routine system upgrade was considered
    too unwieldy and expensive. Most importantly, the existing system did not position Geneva well for
    the future, since it failed to accommodate consigned inventory, vendor-managed inventory, paperless
    purchasing, and other innovations in purchasing and procurement that Geneva wanted to implement.
    The objectives of Phase I were therefore to migrate existing processes from Macpac to R/3, automate
    supply side process not supported by MacPac, and integrate all supply-side data in a single, real-time
    database so that the synergies could be exploited across manufacturing and purchasing processes.
    System integration was also expected to reduce inventory and production costs, improve
    performance-to-master scheduling, and help managers make more optimal manufacturing and
    purchase decisions. Since R/3 would force all data to be entered only once (at source by the
    appropriate shop floor personnel), the need of data reentry would be eliminated, and hence costs of
    data reconciliation would be reduced. The processes to be migrated from MacPac (e.g., MRP,
    procurement) were fairly standardized and efficient, and were hence not targeted for redesign or
    enhancement. Three SAP modules were scheduled for deployment: materials management (MM),
    production planning (PP), and accounts payable component of financial accounting (FI). Exhibit A-1
    in Appendix provides brief descriptions of these and other commonly referenced R/3 modules.
    Phase I of R/3 implementation employed about ten IS personnel, ten full-time users, and ten part-time
    users from business units within Geneva. Whitman-Hart, a consulting company with prior experience
    in R/3 implementation, was contracted to assist with the migration effort. These external consultants
    consisted of one R/3 basis person (for implementing the technical core of the R/3 engine), three R/3
    configurators (for mapping R/3 configuration tables in MM, PP, and FI modules to Geneva’s needs),
    and two ABAP programmers (for custom coding unique requirements not supported by SAP). These
    consultants brought in valuable implementation experience, which was absolutely vital, given that
    Geneva had no in-house expertise in R/3 at that time. Verne Evans, Director of Supply Chain
    Management and a “super user” of MacPac, was assigned the project manager for this phase. SAP’s
    ERP Implementation at Geneva Pharmaceuticals 8
    rapid implementation methodology called Accelerated SAP (ASAP) was selected for deployment,
    because it promised a short implementation cycle of only six months.3
    Four months later, Geneva found that little progress had been made in the implementation process
    despite substantial investments on hardware, software, and consultants. System requirements were
    not defined correctly or in adequate detail, there was little communication or coordination of activities
    among consultants, IS personnel, and user groups, and the project manager was unable to identify or
    resolve problems because he had no prior R/3 experience. In the words of a senior manager, “The
    implementation was clearly spinning out of control.” Consultants employed by Whitman-Hart were
    technical specialists, and had little knowledge of the business domain. The ASAP methodology
    seemed to be failing, because although it allowed a quick canned implementation, it was not flexible
    enough to meet Geneva’s extensive customization needs, did not support process improvements, and
    alienated functional user groups from system implementation. To get the project back into track and
    give it leadership and direction, in February 1998, Geneva hired Randy Weldon as its new CIO.
    Weldon brought in valuable project management experience in R/3 from his previous employer,
    StorageTek.4
    From his prior R/3 experience, Weldon knew that ERP was fundamentally about people and process
    change, rather than about installing and configuring systems, and that successful implementation
    would require the commitment and collaboration of all three stakeholder groups: functional users, IS
    staff, and consultants. He instituted a new project management team, consisting of one IS manager,
    one functional manager, and one senior R/3 consultant. Because Geneva’s internal IS department had
    no R/3 implementation experience, a new team of R/3 professionals (including R/3 basis personnel
    and Oracle database administrators) was recruited. Anna Bourgeois, with over three years of R/3
    experience at Compaq Computers, was brought in to lead Geneva’s internal IS team. Weldon was not
    particularly in favor of Whitman-Hart or the ASAP methodology. However, for project expediency,
    he decided to continue with Whitman-Hart and ASAP for Phase 1, and explore other options for
    subsequent phases.
    By February 1999, the raw materials and manufacturing component of R/3’s MM module was “up
    and running.” But this module was not yet integrated with distribution (Phase II) and therefore did
    not have the capability to readjust production runs based on current sales data. However, several
    business metrics such as yield losses and key performance indicators showed performance
    improvement following R/3 implementation. For instance, the number of planning activities
    performed by a single individual was doubled. Job roles were streamlined, standardized, and
    consolidated, so that the same person could perform more “value-added” activities. Since R/3
    eliminated the need for data rekeying and validating, the portion of the inventory control unit that
    dealt with data entry and error checking was disbanded and these employees were taught new skills
    for reassignment to other purchasing and procurement processes. But R/3 also had its share of
    disappointments, as explained by Camargo:
    3 ASAP is SAP’s rapid implementation methodology that provides implementers a detailed roadmap of the
    implementation life cycle, grouped into five phases: project preparation, business blueprint, realization, final
    preparation, and go live. ASAP provides a detailed listing of activities to be performed in each phase,
    checklists, predefined templates (e.g., business processes, cutover plans), project management tools,
    questionnaires (e.g., to define business process requirements), and a Question & Answer Database
    4 StorageTek is a leading manufacturer of magnetic tape and disk components also based in Colorado.
    ERP Implementation at Geneva Pharmaceuticals 9
    “Ironically, one of the problems we have with SAP, that we did not have with
    Macpac, is for the job to carry the original due date and the current due date, and
    measure production completion against the original due date. SAP only allows us to
    capture one due date, and if we change the date to reflect our current due date, that
    throws our entire planning process into disarray. To measure how we are filling
    orders, we have to do that manually, offline, on a spreadsheet. And we can’t record
    that data either in SAP to measure performance improvements over time.”
    Bourgeois summed up the implementation process as:
    “Phase I, in my opinion, was not done in the most effective way. It was done as
    quickly as possible, but we did not modify the software, did not change the process,
    or did not write any custom report. Looking back, we should have done things
    differently. But we had some problems with the consultants, and by the time I came
    in, it was a little too late to really make a change. But we learned from these
    mistakes, and we hope to do a better job with Phases II and III.”
    Phase II: Demand Side Processes
    Beginning around October 1998, the goals of the second phase were to redesign demand-side
    processes such as marketing, order fulfillment, customer sales and service, and accounts receivable,
    and then implement the reengineered processes using R/3. Geneva was undergoing major business
    transformations especially in the areas of customer sales and service, and previous systems (Macpac,
    FYI Planner, etc.) were unable to accommodate these changes. For instance, in 1998, Geneva started
    a customer-based forecasting process for key customer accounts. It was expected that a better
    prediction of order patterns from major customers would help the company improve its master
    scheduling, while reducing safety stock and missed orders. The prior forecasting software, FYI
    Planner, did not allow forecasting on a customer-by-customer basis. Besides, demand-side processes
    suffered from similar lack of data integration and real-time access as supply side processes, and R/3
    implementation, by virtue of its real-time integration of all operational data would help manage crossfunctional
    processes better. Mark Mecca, Director of Customer Partnering, observed:
    “Before SAP, much of our customer sales and service were managed in batch mode
    using MacPac. EDI orders came in once a night, chargebacks came in once a day,
    invoicing is done overnight, shipments got posted once a day; so you don’t know
    what you shipped for the day until that data was entered the following day. SAP will
    allow us to have access to real-time data across the enterprise. There will be
    complete integration with accounting, so we will get accurate accounts receivable
    data at the time a customer initiates a sales transaction. Sometime in the future,
    hopefully, we will have enough integration with our manufacturing processes so that
    we can look at our manufacturing schedule and promise a customer exactly when we
    can fill his order.”
    However, the second phase was much more challenging than the first phase, given the non-standard
    and inherently complex nature of Geneva’s sales and service processes. For instance, customer rebate
    ERP Implementation at Geneva Pharmaceuticals 10
    percentages varied across customers, customer-product combinations, and customer-product-order
    volume combinations. Additionally, the same customer sometimes had multiple accounts with
    Geneva and had a different rebate percentage negotiated for each account.
    Bourgeois was assigned overall responsibility of the project, by virtue of her extensive knowledge of
    EDI, R/3 interface conversion, and sales and distribution processes, and ability to serve as a technical
    liaison between application and basis personnel. Whitman-Hart was replaced with a new consulting
    firm, Arthur Andersen Business Consulting, to assist Geneva with the second and third phases of R/3
    implementation. Oliver White, a consulting firm specializing in operational processes for
    manufacturing firms, was also hired to help redesign existing sales and distribution processes using
    “best practices,” prior to R/3 implementation. Weldon explained the reason for hiring two consulting
    groups:
    “Arthur Anderson was very knowledgeable in the technical and configurational
    aspects of SAP implementation, but Oliver White was the process guru. Unlike
    Phase I, we were clearly targeting process redesign and enhancement in Phases II
    and III, and Oliver White brought in ‘best practices’ by virtue of their extensive
    experience with process changes in manufacturing organizations. Since Phase I was
    somewhat of a disaster, we wanted to make sure that we did everything right in
    Phases II and III and not skimp on resources.”
    Technical implementation in Phase II proceeded in three stages: conceptual design, conference room
    pilot, and change management. In the conceptual design stage, key users most knowledgeable with
    the existing process were identified, assembled in a room, and interviewed, with assistance from
    Oliver White consultants. Process diagrams were constructed on “post-it” notes and stuck to the
    walls of a conference room for others to view, critique, and suggest modifications. The scope and
    boundaries of existing processes, inputs and deliverables of each process, system interfaces, extent of
    process customization, and required level of system flexibility were analyzed. An iterative process
    was employed to identify and eliminate activities that did not add value, and generate alternative
    process flows. The goal was to map the baseline or existing (“AS-IS”) processes, identify bottlenecks
    and problem areas, and thereby, to create reengineered (“TO-BE”) processes. This information
    became the basis for subsequent configuration of the R/3 system in the conference room pilot stage.
    A core team of 20 IS personnel, users, and consultants worked full-time on conceptual design for 2.5
    months (this team later expanded to 35 members in the conference room pilot stage). Another 30
    users were involved part-time in this effort; these individuals were brought in for focused periods of
    time (between 4 and 14 hours) to discuss, clarify, and agree on complex distribution-related issues.
    The core team was divided into five groups to examine different aspects of the distribution process:
    (1) product and business planning, (2) preorder (pricing, chargebacks, rebates, contracts, etc.), (3)
    order processing, (4) fulfillment (shipping, delivery confirmation, etc.), and (5) post-order (accounts
    receivable, credit management, customer service, etc.). Thirteen different improvement areas were
    identified, of which four key areas emerged repeatedly from cross-functional analysis by the five
    groups and were targeted for improvement: product destruction, customer dispute resolution, pricing
    strategy, and service level. Elaborate models were constructed (via fish bone approach) for each of
    these four areas to identify what factors drove these areas, what was the source of problems in these
    areas, and how could they be improved using policy initiatives.
    ERP Implementation at Geneva Pharmaceuticals 11
    The conceptual design results were used to configure and test prototype R/3 systems for each of the
    four key improvement areas in the conference room pilot stage. The purpose of the prototypes was to
    test and refine different aspects of the redesigned processes such as forecast planning, contract
    pricing, chargeback strategy determination, receivables creation, pre-transaction credit checking,
    basic reporting, and so forth in a simulated environment. The prototypes were modified several times
    based on user feedback, and the final versions were targeted for rollout using the ASAP methodology.
    In the change management stage, five training rooms were equipped with computers running the
    client version of the R/3 software to train users on the redesigned processes and the new R/3
    environment. An advisory committee was formed to oversee and coordinate the change management
    process. Reporting directly to the senior vice president level, this committee was given the mandate
    and resources to plan and implement any change strategies that they would consider beneficial. A
    change management professional and several trainers were brought in to assist with this effort.
    Multiple “brown bag luncheons” were organized to plan out the course of change and discuss what
    change strategies would be least disruptive. Super users and functional managers, who had the
    organizational position to influence the behaviors of colleagues or subordinates in their respective
    units, were identified and targeted as potential change agents. The idea was to seed individual
    business units with change agents they could trust and relate to, in an effort to drive a grassroots
    program for change.
    To stimulate employee awareness, prior to actual training, signs were put up throughout the company
    that said, “Do you know that your job is changing?” Company newsletters were used to enhance
    project visibility and to address employee questions or concerns about the impending change. A
    separate telephone line was created for employees to call anytime and inquire about the project and
    how their jobs would be affected. The human resources unit conducted an employee survey to
    understand how employees viewed the R/3 implementation and gauge their receptivity to changes in
    job roles as a result of this implementation.
    Training proceeded full-time for three weeks. Each user received an average of 3-5 days of training
    on process and system aspects. Training was hands-on, team-oriented, and continuously mentored,
    and was oriented around employees’ job roles such as how to process customer orders, how to move
    inventory around, and how to make general ledger entries, rather than how to use the R/3 system.
    Weldon described the rationale for this unique, non-traditional mode of training:
    “Traditional system training does not work very well for SAP implementation
    because this is not only a technology change but also a change in work process,
    culture, and habits, and these are very difficult things to change. You are talking
    about changing attitudes and job roles that have been ingrained in employees’ minds
    for years and in some cases, decades. System training will overwhelm less
    sophisticated users and they will think, ‘O my God, I have no clue what this computer
    thing is all about, I don’t know what to do if the screen freezes, I don’t know how to
    handle exceptions, I’m sure to fail.’ Training should not focus on how they should
    use the system, but on how they should do their own job using the system. In our
    case, it was a regular on-the-job training rather than a system training, and
    employees approached it as something that would help them do their job better.”
    ERP Implementation at Geneva Pharmaceuticals 12
    Several startling revelations were uncovered during the training process. First, there was a
    considerable degree of confusion among employees on what their exact job responsibilities were,
    even in the pre-R/3 era. Some training resources had to be expended in reconciling these differences,
    and to eliminate ambiguity about their post-implementation roles. Second, Geneva’s departments
    were very much functionally oriented and wanted the highest level of efficiency from their
    department, sometimes to the detriment of other departments or the overall process. This has been a
    sticky cultural problem, and at the time of the case, the advisory committee was working with senior
    management to see if any structural changes could be initiated within the company to affect a mindset
    change. Third, Geneva realized that change must also be initiated on the customer side, so that
    customers are aware of the system’s benefits and are able to use it appropriately. In the interest of
    project completion, customer education programs were postponed until the completion of Phase III of
    R/3 implementation.
    The primary business metric tracked for Phase II implementation was customer service level, while
    other metrics included days of inventory on hand, dollar amount in disputes, dollar amount destroyed,
    and so forth. Customer service was assessed by Geneva’s customers as: (1) whether the item ordered
    was in stock, (2) whether Geneva was able to fill the entire order in one shipment, and (3) if
    backordered, whether the backorder delivered on time. With a customer service levels in the 80’s,
    Geneva has lagged its industry competitors (mostly in the mid 90’s), but has set an aggressive goal to
    exceed 99.5 percent service level by year-end 1999. Camargo observed that there was some decrease
    in customer service, but this decrease was not due to R/3 implementation but because Geneva faced
    an impending capacity shortfall and the planners did not foresee the shortfall quickly enough to
    implement contingency plans. Camargo expected that such problems would be alleviated as
    performance-to-schedule and demand forecasting improved as a result of R/3 implementation. Given
    that Phase II implementation is still underway at the time of the case (“go live” date is February 1,
    2000), it is still too early to assess whether these targets are reached.
    Phase 3: Integrating Supply and Demand
    Geneva’s quest for integrating supply and demand side processes began in 1994 with its supply chain
    management (SCM) initiative. But the program was shelved for several years due to the nonintegrated
    nature of systems, immaturity of the discipline, and financial limitations. The initiative
    resurfaced on the planning boards in 1998 under the leadership of Verne Evans, Director of SCM, as
    R/3 promised to remove the technological bottlenecks that prevented successful SCM
    implementation. Though SCM theoretically extends beyond the company’s boundaries to include its
    suppliers and customers, Geneva targeted the mission-critical the manufacturing resource planning
    (MRP-II) component within SCM, and more specifically, the Sales and Operations Planning (SOP)
    process as the means of implementing “just-in-time” production scheduling. SOP dynamically linked
    planning activities in Geneva’s upstream (manufacturing) and downstream (sales) operations,
    allowing the company to continuously update its manufacturing capacity and scheduling in response
    to continuously changing customer demands (both planned and unanticipated). Geneva’s MRP-II and
    SOP processes are illustrated in Exhibits 5 and 6 respectively.
    Until the mid-1990’s, Geneva had no formal SOP process, either manual or automated.
    Manufacturing planning was isolated from demand data, and was primarily based on historical
    ERP Implementation at Geneva Pharmaceuticals 13
    demand patterns. If a customer (distributor) placed an unexpected order or requested a change in an
    existing order, the manufacturing unit was unable to adjust their production plan accordingly. This
    lack of flexibility led to unfilled orders or excess inventory and dissatisfied (and sometimes lost)
    customers. Prior sales and manufacturing systems were incompatible with each other, and did not
    allow the integration of supply and demand data, as required by SOP. In case production plans
    required modification to accommodate a request from a major customer, such decisions were made on
    an ad-hoc basis, based on intuition rather than business rationale, which sometimes had adverse
    repercussions on manufacturing operations.
    To remedy these problems, Geneva started a manual SOP process in 1997 (see Exhibit 6). In this
    approach, after the financial close of each month, sales planning and forecast data were aggregated
    from order entry and forecasting systems, validated, and manually keyed into master scheduling and
    production planning systems. Likewise, prior period production and inventory data were entered into
    order management systems. The supply planning team and demand analysis team arrived at their
    own independent analysis of what target production and target sales should be. These estimates
    (likely to be different) were subsequently reviewed in a joint meeting of demand analysts and master
    schedulers and reconciliated. Once an agreement was reached, senior executives (President of
    Geneva and Senior Vice Presidents), convened a business planning meeting, where the final
    production plan and demand schedule were analyzed based on business assumptions, key customers,
    key performance indicators, financial goals and projections (market share, revenues, profits), and
    other strategic initiatives (e.g., introduction of a new product). The purpose of this final meeting was
    not only to fine-tune the master schedule, but also to reexamine the corporate assumptions, growth
    estimates, and the like in light of the master schedule, and to develop a better understanding of the
    corporate business. The entire planning process took 20 business days (one month), of which the first
    10 days were spent in data reentry and validation across corporate systems, followed by five days of
    demand planning, two days of supply planning, and three days of reconciliation. The final business
    planning meeting was scheduled on the last Friday of the month to approve production plans for the
    following month. Interestingly, when the planning process was completed one month later, the
    planning team had a good idea of the production schedule one month prior. If Geneva decided to
    override the targeted production plans to accommodate a customer request, such changes undermined
    the utility of the SOP process.
    While the redesigned SOP process was a major improvement over the pre-SOP era, the manual
    process was itself limited by the time-lag and errors in data reentry and validation across sales,
    production, and financial systems. Further, the process took one month, and was not sensitive to
    changes in customer orders placed less than a month from their requested delivery dates. Since much
    of the planning time was consumed in reentering and validating data from one system to another,
    Evans estimated that if an automated system supported real-time integration of all supply and demand
    data in a single unified database, the planning cycle could be reduced to ten business days.
    Though SAP provided a SOP module with their R/3 package, Geneva’s R/3 project management team
    believed that this module lacked the “intelligence” required to generate an “optimal” production plan
    from continuously changing supply and demand data, even when all data were available in a common
    database. The R/3 system was originally designed as a data repository, not an analysis tool to solve
    ERP Implementation at Geneva Pharmaceuticals 14
    complex supply chain problems or provide simulation capabilities5. Subsequently, in 1999, when
    SAP added a new Advanced Purchase Optimizer (APO) module to help with data analysis, Geneva
    realized that the combination of R/3’s SOP and APO modules would be the answer to their unique
    SOP needs.
    At the time of the case, Geneva was in the initial requirements definition stage of SOP
    implementation. To aid in this effort, Oliver White had created a template that could aggregate all
    relevant data required for SOP from distribution, operations, purchasing, quality control, and other
    functional databases, and tie these data to their source processes. It was expected that the template
    would provide a common reference point for all individuals participating in the SOP process and
    synchronize their decision processes.
    The primary business metric targeted for improvement in Phase III implementation is “available to
    promise” (ATP), i.e., whether Geneva is able to fulfill a customer order by the promised time. ATP is
    an integration of customer service level and business performance, the erstwhile key business metrics
    in the pre-SOP era. Customers often placed orders too large to be fulfilled immediately, and ATP
    was expected to provide customers with reasonably accurate dates on when they should expect which
    part of their order to be filled. Generating and meeting these dates would enable Geneva improve its
    customer service levels that not providing any fulfillment dates at all. With declining profit margins,
    as the generics industry is forced to explore new means of cost reduction, Geneva expects that thin
    inventories, just-in-time manufacturing, and top quality customer service will eventually be the
    drivers of success, hence the importance of this metric. Evans explains the importance of ATP as a
    business metric as:
    “Most of our customers understand the dynamics of our business, and how difficult it
    is for us to fulfill a large order instantaneously with limited production capacity. But
    most of them are willing to bear with backorders if we can promise them a
    reasonable delivery date for their backorder and actually deliver on that date. That
    way, we take less of a customer service level hit than defaulting on the order or being
    unable to accommodate it. In commodity business such as ours, customer service is
    the king. Our customers may be willing to pay a little premium over the market for
    assured and reliable service, so that they can meet their obligations to their
    customers. Customer service may be a strategic way to build long-term relationships
    with our customers, but of course, we are far from proving or disproving that
    hypothesis.”
    Future Plans
    Despite some initial setbacks in Phase I, Geneva is now back on the road to a successful R/3
    implementation. The senior management, functional units, and IS personnel are all enthusiastic about
    the project and looking forward to its deployment in all operational areas of business and beyond.
    R/3 implementation has opened up new possibilities to Geneva and more means of competing in the
    5 Typically, manufacturing companies requiring SCM analysis used additional analysis tools from I2
    Technologies or Manugistics on top of ERP databases from SAP or Oracle for SCM purposes.
    ERP Implementation at Geneva Pharmaceuticals 15
    intensely competitive generic drugs industry. Weldon provided an overall assessment of the benefits
    achieved via R/3 implementation:
    “In my opinion, we are doing most of the same things, but we are doing them better,
    faster, and with fewer resources. We are able to better integrate our operational
    data, and are able to access that data in a timely manner for making critical business
    decisions. At the same time, SAP implementation has placed us in a position to
    leverage future technological improvements and process innovations, and we expect
    to grow with the system over time.”
    Currently, the primary focus of Geneva’s R/3 implementation is timely completion of Phase II and III
    by February 2000 and December 2000 respectively. Once completed, the implementation team can
    then turn to some of R/3’s additional capabilities that are not being utilized at Geneva. In particular,
    the quality control and human resource modules are earmarked for implementation after Phase III.
    Additionally, Geneva plans to strengthen relationships with key suppliers and customers by
    seamlessly integrating the entire supply chain. The first step in this direction is vendor managed
    inventory (VMI), that was initiated by Geneva in April 1998 for a grocery store chain and a major
    distributor. In this arrangement, Geneva obtains real-time, updated, electronic information about
    customers’ inventories, and replenish their inventories on a just-in-time basis without a formal
    ordering process, based on their demand patterns, sales forecast, and actual sales (effectively
    operating as customers’ purchasing unit).6 Geneva’s current VMI system, Score, was purchased from
    Supply Chain Solutions (SCS) in 1998. Though Mecca is satisfied with this system, he believes that
    Geneva can benefit more from R/3’s ATP module via a combination of VMI functionality and
    seamless company-wide data integration. Currently, some of Geneva’s customers are hesitant to
    adopt VMI because sharing of critical sales data may cause them to lose bargaining power vis-à-vis
    their suppliers or prevent them from speculative buying. But over the long-term, the inherent
    business need for cost reduction in the generics industry is expected to drive these and other
    customers toward VMI. Geneva wants to ensure that the company is ready if and when such
    opportunity arises.
    6 Real-time customer forecast and sales data is run through a VMI software (a mini-MRP system), which
    determines optimum safety stock levels and reorder points for customers, and a corresponding, more optimum
    production schedule for Geneva. Initial performance statistics at the grocery store chain indicated that customer
    service levels increased from 96 percent to 99.5 percent and on-hand inventory decreased from 8 weeks to six
    weeks as a result of VMI implementation. For the distributor, Geneva expects that VMI will reduce on-hand
    inventory from seven months to three months.
    ERP Implementation at Geneva Pharmaceuticals 16
    Exhibit 1. Novartis’ divisions
    Divisions Business Units
    Healthcare Pharmaceuticals
    Consumer Health
    Generics
    CIBA Vision
    Agribusiness Crop Protection
    Seeds
    Animal Health
    Nutrition Infant and Baby Nutrition
    Medical Nutrition
    Health Nutrition
    Exhibit 2. Novartis’ five-year financial summary
    1998 1997 1996 1995 1994
    Annual sales 31,702 31,180 36,233 35,943 37,919
    Sales from healthcare 17,535 16,987 14,048 12,906 14,408
    Sales from agribusiness 8,379 8,327 7,624 7,047 7,135
    Sales from consumer health 5,788 5,866 5,927 5,777 4,258
    Sales from industry - - 8,634 10,213 12,118
    Operating income 7,356 6,783 5,781 5,714 5,093
    Net income 6,064 5,211 2,304 4,216 3,647
    Cash flow from operations 5,886 4,679 4,741 5,729 5,048
    R&D expenditure 3,725 3,693 3,656 3,527 3,786
    Total assets 55,375 53,390 58,027 50,888 51,409
    Net operating assets 20,913 19,619 21,820 22,278 22,952
    Number of employees at year-end 82,449 87,239 116,178 133,959 144,284
    Sales per employee (Swiss Francs) 369,337 350,905 289,705 258,357 266,740
    Debt/equity ratio 0.28 0.41 0.46 0.46 0.57
    Current ratio 2.0 1.7 1.9 2.2 1.6
    Return on sales (%) 19.1 16.7 13.9 - -
    Return on equity (%) 21.0 20.7 16.7 - -
    Note: All figures in millions of Swiss Francs, except otherwise indicated.
    Pre-1996 data is on pro forma basis, based on pooled data from Ciba and Sandoz.
    ERP Implementation at Geneva Pharmaceuticals 17
    Exhibit 3. Phases in R/3 implementation at Geneva
    Phases1 Business processes R/3 modules Implementation timeline
    (inception to go-live)
    Phase I: Supply side
    management
    MRP, purchasing, inventory
    management
    MM2, PP,
    FI/CO3
    Nov 1997 – Feb 1999
    Phase II: Demand side
    management
    Order management, sales,
    customer service
    SD, MM4,
    FI/CO5
    Oct 1998 – Feb 2000
    Phase III: Supply/demand
    integration, business
    intelligence
    Sales & operations planning,
    supply chain management,
    data warehousing
    APO, MES,
    BIW
    Early 2000 – End 2000
    Note: 1Vendor selection took place in mid-1997
    2MM: Raw materials inventory
    4MM: Finished goods inventory
    3FI/CO: Accounts payable
    5FI/CO: Accounts receivable
    Vendor
    System
    Sales orders ATP
    Sales & Distribution
    Customer
    Inquiry Quotation
    Order
    Generation
    Goods
    Issue
    Billing
    Delivery Document
    Update
    Financials
    Inventory
    Management
    Update
    Demand
    Management
    Run
    MPS/MRP
    Production Planning Materials
    Management
    Finance &
    Controlling
    Exhibit 4. Geneva’s order management process
    ERP Implementation at Geneva Pharmaceuticals 18
    Business Planning
    Sales & Operations
    Planning
    DRP Master
    Scheduling
    Detailed Materials/
    Capacity Planning
    Plant & Supplier
    Scheduling
    Execution
    Demand
    Management
    Rough-Cut
    Capacity Planning
    Exhibit 5. Geneva’s manufacturing resource planning process
    Exhibit 6. Geneva’s sales & operations planning process
    Demand
    Planning
    Supply
    Planning
    Integration/
    Reconciliation
    Business Planning
    (S&OP)
    Key Activities:
    • Product planning
    • Forecasting
    • Sales planning
    • Performance
    management
    (prior period)
    • Master production
    scheduling
    • Capacity planning
    • Materials requirements
    planning
    • Consolidation of
    demand, supply,
    inventory, and
    financial plans
    • Feedback to
    demand and
    supply planning
    • Performance review
    • Key assumptions review
    • Product family review
    • Key customers review
    • Financial review
    • Approval/action items
    Current Planning Cycle (Monthly):
    Financial
    close
    (prior month)
    0 5 10 15 17 20 (Business
    days)
    Demand
    planning
    Supply
    planning
    Integration
    Business
    planning
    Goal:
    To reduce the planning cycle time from one month to 10 business days.
    ERP Implementation at Geneva Pharmaceuticals 19
    Appendix
    SAP (Systems, Applications, and Products in Data Processing) is the world’s fourth largest software
    company, and the largest enterprise resource planning (ERP) vendor. As of February 1999, the
    company employed 19,300 employees and had annual revenues of $5 billion, annual growth of 44
    percent, over 10,000 customers in 107 countries, and 36 percent of the ERP market. SAP AG was
    founded in 1972 by Dr. H.C. Hasso Plattner and Dr. Henning Kagermann in Walldorf, Germany with
    the goal of producing an integrated application software, that would run all mission-critical operations
    in corporations, from purchasing to manufacturing to order fulfillment and accounting. This
    integration would help companies optimize their supply chains, manage customer relationships, and
    make better management decisions. SAP brings in 26 years of leadership in process innovations and
    ERP, and invests 20 percent of its revenues back into research and development.
    SAP’s first breakthrough product was the R/2 system, which ran on mainframe computers. R/2 and
    its competitors were called ERP systems, to reflect the fact that they extended the functions of earlier
    materials requirements planning (MRP) systems in manufacturing firms to include other functions
    and business processes such as sales and accounting. In 1992, SAP released its R/3 system, the
    client/server variant of the earlier R/2 system, which was installed in 20,000 locations worldwide, and
    R/2 is installed in over 1,300 locations by mid-1999. Initially targeted at the world’s largest
    corporations such as AT&T, BBC, Deutsche Bank, IBM, KPMG, Merck, Microsoft, Nestle, Nike,
    and Siemens, R/3 has since been deployed by companies of all sizes, geographical locations, and
    industries. SAP solutions are available for 18 comprehensive industry solutions (“verticals”) for
    specific industry sectors such as banking, oil & gas, electronics, health care, and public sector.

  • Open items can not be cleared FZ326

    Hello,
    I arrived on a project and learnt a former member who left created a huge issue in production. As he deleted a parallel currency depreciation area and the parallel currency type 30 in FI itself, we are currently unable to clear any open item in one company code (Internal error: doc.balance not zero / comp.code 0071 vendor XXXXXXX customer) ==> message FZ326.
    SAP recommends sending a SAP consultant for 2 days to solve the issue (by deleting parallel currency values in open items to be able to clear). So we try to find a solution first.
    I tried reactivating the parallel currency and recreating the dep. area to solve the problem, currently I sent this to simulation environment but now I am facing an issue with IO settlement to AUC.
    The internal order has been settled to AUC without depreciation area 32 (the one for parallel currency). Now if I try to settle the remaining value on the AuC I get message:
    Message no. AAPO104: Data inconsistency: Parallel depr. area is not posted
    On the other hand if I try cancelling the first settlement to create new asset and AuC I get another error:
    Document balance cannot be distributed when settlement is reversed
    Message no. AW751
    So I think I am kind of stuck here !
    Does anyone have a solution at this point (activating depreciation area 32 in AuC and final asset / removing parallel currency values in documents to be able to clear in production / reversing settlement to be able to post to asset with area 32...)
    Thanks in advance,
    Regards,
    Benoit

    Hello Schneider,
    Your description consists of many things. Probably, I could not correlate the FZ326 error with the ones in Asset accounting.
    However, since you are working in a real-time scenario, possibly you could explain better.
    Nevertheless, check if the transaction type is limited to certain depreciation areas. If there is such a limitation, add the missing depreciation areas for the transaction type. Check if the asset that is being posted manages  all these depreciation areas.
    Some information on the parallel currencies :
    - The par. dep. area must have the same settings as the original area  (e.g. allowing APC).
    - The par. dep. area must set for identical values take over.
    - The par. dep. area must set for identical parameter take over.
    - The par. dep. area must be assigned to the currency type which is defined as parallel in FI.
    - The par. dep. area must be activated in the asset class (TCode OAYZ)
    - If the par. dep. area is a new area in a productive environment the new area must be created for all existings assets in the company code.
    When you follow these steps correctly you will not get error AAPO104 anymore. For more information, please also check SAP note 67688 about activating Depreciation Area.
    The reason for error AW751 could be that the exchange rate table would have been changed since the settlement was run.
    The program expects that there will be the same currency rates in the settlement AND the settlement reversal. The exchange rate table can be seen using transaction OB08.
    To correct the error, to process a reversal for a settlement done earlier in the month with a different exchange rate, the only solution is to change the exchange rate table. It would be possible that a temporary change could be done when no one else is in the system, you can run the reversal and immediately change the table back to the state as before.
    I hope this information helps you.
    Best regards,
    Suresh Jayanthi.

Maybe you are looking for

  • To close open PR

    hi friends currently my client took the open PR status and tried to closed that. But in that we faced a PR created for an assert is on open, but the assert master is closed. drop ur suggestion to close the PR document. thanx sanjay

  • IPhone won't charge using Mophie Juice Pack after upgrade to 3.1

    I have an iPhone 3GS. I have been using a Mophie Juice Pack to charge it with good results. After the upgrade to 3.1, the Juice Pack no longer charges the iPhone. I get the dreaded message, "This accessory is not made to work with the iPhone." Of cou

  • How to validate for a table name and field name parameters ?

    Dear techies,                   Kindly help me in validating two parameters. 1) table name (Date element = CDTABNAME ). 2) field name  (Data Element = FIELDNAME ). I need to know the master table which can be used to validate both the fields.........

  • PayloadSwapBean in receiver soap adapter

    Hi experts, i'd like to ask whether PayloadSwapBean could be used in receiver soap adapter to swap payload to attachment? if not, is there any alternative to do so? please enlighten me if you have any suggestion, thanks.

  • Vendor in condition type/purch info record

    hi, in condition type, i notice in account determination, there is a vendor field. but this vendor field not exist in all condition type. only freight/customs related with this vendor field. 1) may i know how does the system know whether the conditio