From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 488: command requires GPIB controller to be controller in charge

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?

0 Kudos
Message 1 of 14
(4,667 Views)

Hi shreya,

 

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(4,653 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 14
(4,634 Views)

I couldn't attach the whole zipped project as the size is too high. I've attached the sub-VI where the problem is occuring. Please take a look, thanks.

Download All
0 Kudos
Message 4 of 14
(4,612 Views)

Hi shreya,

 

- the BD is far too big for a FullHD screen…

- you use way too much local variables…

- there are a lot of missing subVIs…

- you didn't say where the error occured: due to those other points I don't feel like having to search for that error…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 14
(4,605 Views)

hi the error points to the enqueue element function in the "output" state of the CC_control.vi subVI. Does this help?

0 Kudos
Message 6 of 14
(4,597 Views)

Hi shreya,

 

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 14
(4,590 Views)

 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.)

 

0 Kudos
Message 8 of 14
(4,426 Views)

Hi shreya,

 

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

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 14
(4,413 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 14
(4,394 Views)