Showing results for 
Search instead for 
Did you mean: 

Microsoft JScript Compilation Error



 I have written a program that is controlling a manufacturing setup. The labview program consists of two independent loops. One controls the motors through an analog output. The second turns a bath sonicator on and off at a specified interval. The sonicator loop is output through a digital channel. This program runs for approximately 5 days. However after 18 to 24 hours I receive an error... "Header: Mircosoft JScript Compilation Error Below: Syntax Error" The overall program continues to run but the sonicator portion stops running. I have put a log process into the sonicator loop in a hope to determine a pattern. I ran the program multiple times they stopped running at random times during the night and there is no pattern to the number of cycles completed. Thanks to the log I have determined this is definitely not a hardware problem, but is a software problem. If anyone has an idea I would greatly welcome.


0 Kudos
Message 1 of 4

Hello Myles,


I was hoping I could extract a bit more information about the system:


1. What version of LabVIEW are you working with?


2. Is it possible to post your VI, or a Screenshot of the trouble spot?


3. I assume the Error is within Windows (2000,XP, Vista, 7?), and not originating in LabVIEW, as the program continues to run? 


4. What is the nature of the log data you are collecting? How were you able to identify a software error?


5. How is communication to the 'Sonicator' established? Are there LabVIEW VI's, (perhaps driver VIs), that call to a DLL for hardware level interaction? 


6. If VIs have been developed for hardware communication, how are their errors handled? Does the Sonicator loop continue to iterate, or is it stopped by error handling? If stopped, what error codes are forwarded?


I appreciate your time working with this type of troubleshooting. With you additional responses, we are more than happy to continue assist in reaching a successful deployment.


Thank you,




Patrick Corcoran
Application Engineering Specialist | Control
National Instruments

0 Kudos
Message 2 of 4

Sorry that was information I should have included in the first message but it was a late night.


1) I was running it on labview 8.5.3, I just upgraded computers and the school installed labview 8.6.1 on this computer. There seems to be no difference in the problem between computers or between versions of labview.


2) I have outline the "sonicator" loop in red



3) Both computer have been running Windows XP Professional, I don't think the problem is originating in labview as the main program continues to run.


4) The log I created can be seen in the last frame in the sonicator loop. It simply outputs the time and date that the sonicator loop completed a cycle


here is an example of a cycle specified to turn the sonicator on for 20 minutes out of every hour


3:24 PM 1/18/2010

4:24 PM 1/18/2010

5:24 PM 1/18/2010

6:24 PM 1/18/2010

7:24 PM 1/18/2010

8:24 PM 1/18/2010

9:24 PM 1/18/2010

10:24 PM 1/18/2010

11:24 PM 1/18/2010

12:24 AM 1/19/2010

1:24 AM 1/19/2010

2:24 AM 1/19/2010

3:24 AM 1/19/2010

4:24 AM 1/19/2010

5:24 AM 1/19/2010

6:24 AM 1/19/2010

7:24 AM 1/19/2010

8:24 AM 1/19/2010

9:24 AM 1/19/2010

10:24 AM 1/19/2010

11:24 AM 1/19/2010

12:24 PM 1/19/2010

1:24 PM 1/19/2010

2:24 PM 1/19/2010

3:24 PM 1/19/2010

4:24 PM 1/19/2010

5:24 PM 1/19/2010

6:24 PM 1/19/2010

7:24 PM 1/19/2010

8:24 PM 1/19/2010


This log stopped at 8:24 and the main program was still running the next day when I came in, with the error stated above showing. There is no physical damage to the circuit, and I can still manually turn the sonicator circuit on/off using a small sub VI, I would expect it to be a software problem in the "sonicator" loop. Also I can restart this program and the sonicator acts normal again for ~24 hours until the same error.


5/6) This project was kind of frankinsteined together (as you may recognize by the top loop, which is the motor control loop, the school is too cheap to invest in NI Motion control) there is no real communications between the equipment and labview. Labview is simply outputting signals, in the case of the stepper motor, the analog step signal is used to trigger a step in the motor encoder board. In the case of the sonicator the on/off signal is amplified and feed into a normally open relay which controls the power to the sonicator. The system was designed to handle errors by failing to safe, although there haven't been any errors other than this one.


Although I believe it is a software problem I am using a PCI-6024e, just in case it is relevant.


Thank you for the help



0 Kudos
Message 3 of 4

Hey Sci Fi,


Thank you for the follow up. One thing that I do notice about the code is that the Sonicator Loop is functioning correctly, stopping its iteration at the 30th cycle:




You may choose to place an indicator in the i+1 output to verify that the loop executes the desired number of iterations. 


In additon, the second frame of the sonicator loop does not utilize data flow to specifiy whether or not the time delay or the digital output  occurs first. If you are expecting a certain sonication time based on the time delay, I would strongly encourage utilizing the error wires to ensure that the digital output is set to true, and subsequently the time delay is invoked. Currently, each iteration leaves the process decision to Windows on which actions occurs first, meaning certain sonication periods may have only been a couple milliseconds. 


With regard to the JScript error, the first thing to check is if there are any additional programs running in the backgroud during the test. Also, if we can clearly asscociate the stop of the sonicator loop with the JScript error by extending the number of iterations. It is possible if additional software is being use to control the sonciator, that an unintended consequence of stopping the control loop is the induction of the JScript error. 


I hope this helps move forward with the tourbleshooting process. Please post any additional questions.


Thank You,

Patrick Corcoran
Application Engineering Specialist | Control
National Instruments

0 Kudos
Message 4 of 4