Hi I'm trying to simulate a charge controller for an electrical vehical prototype. I'm using cRIO for communication between the charging station and LabVIEW. Sometimes while running the program, the above error is displayed and I have to restart the communication module, charger and motor for controlling the vehicle prototype. The error points to the enqueue element function and this happens rarely, but randomly.
it says "an input parameter is invalid". what do i do to fix this?
your message is lacking a lot of information!
Do you work with GPIB bus devices?
Which "enqueue" function are you talking about? Plain Queue function in LabVIEW? Why should it output a GPIB error message?
Can you attach your VI or atleast a snippet of the problematic function?
What have you done to debug this problem?
First of all, if you aren't using GPIB, then ignore the GPIB part of the error message. Look at the part before that. Error code 1 returns this:
LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
When coming from a Dequeue Element, that tell me that either a) you closed your queue but didn't stop your consumer loop or b) you somehow lost your reference in your consumer loop.
we need code in order to properly diagnose this. I recommend zipping up your project and posting that zip file.
hi the error points to the enqueue element function in the "output" state of the CC_control.vi subVI. Does this help?
you use two different queue reference, either a freshly generated one or a reference coming from an input cluster. While only one is used (depending on a local variable, that could be replced by a wire) it gets closed after the loop. If its the reference of the input cluster the queue will be closed/deleted in the next run of your CC-subVI…
You should close references in the same context where you open/create them. Opening references in a main VI and closing them in a subVI, which is called more than once, will result in hassle!
Clean up your VIs. Replace all those local variables by wires. Check the style guidelines in the LabVIE help!
A subVI for communicating with the charge control is attached [CC_control.vi]. I have the above mentioned error in the main program due to the CC_control.vi. The error occurs occasionally and ceases when I restart all the hardware. Is it because the file is closed and opened again in the "Read all registers" case within the loop? What should I do to rectify this? [All the code was developed by a pervious student].
(P.S. Some blocks might be missing as I could not locate the polymorphic VI in the same case.)
as has been surely said before: get rid of local variables. THINK DATAFLOW and use wires instead!
The error you mention should be error number 1: "invalid input parameter". The GPIB error should be irrelevant to you.
And yes, it could come from file handling issues - you need to program some decent error handling…
Error Code 1 almost aways means you closed a reference before trying to use it somewhere. Check your references very carefully. And probe around to see what function is causing your errors. That will help you quite a bit in troubleshooting your issue.