ni / niveristand-scan-engine-ethercat-custom-device

Provides NI Scan Engine, EtherCAT and Remote IO support for NI VeriStand
MIT License
16 stars 22 forks source link

Module NI-9214 Not listed at first call to Auto-Detect feature in SE #33

Closed VincentRuault closed 5 years ago

VincentRuault commented 5 years ago

Describe the bug On a recent Linux-64x bit chassis (NI-9040), when user has a NI-9214 module in his configuration, it takes 2 calls to "Auto-Detect" to have it listed in System-Explorer.

It has been seen by customer and I reproduced it wit following configuration: NI-9049 NI-9239 (Slot #1) NI-9214 (Slot #2) NI-9263 (slot #3) Empty (Slot #4)

To Reproduce Steps to reproduce the behavior:

  1. Go to MAX, change Modules Programming Mode to DAQmx.
  2. In SE, put controller in Scan-Mode (Target Main page)
  3. In SE, instance SEEC CD
  4. In SE, hit "Auto-Detect Modules" in button bar (at the top)
  5. Click OK to Continue
  6. On the "Change Slots Programming" window, check "Set all modules to "Scan Engine" Mode" and click "OK" button.
  7. In SE, NI-9239 and NI-9263 are listed but not NI-9214. (Cf. first capture below).
  8. In SE, hit "Auto-Detect Modules" in button bar (at the top)
  9. Click OK to Continue
  10. Click "OK" button on the "Change Slots Programming" window.
  11. In SE, NI-9239, NI-9214 and NI-9263 are listed. (Cf. second capture below).

NOTE: that steps 4-6 should be executed rapidly to reproduce the issue. Otherwise, we don't see it

Expected behavior It shouldn't take 2 calls to be listed.

Screenshots After first Call: First Call

After second Call:

Second Call

Desktop (please complete the following information):

Additional context In debug XML file: VeriStand_ECAT_Logfile.xml, module NI-9214 is listed. Then, I added a Debug information to VI called "Host - Get Local and ECAT Masters.vi" and I noticed the error 65700 is returned at first call. So, it would explain why it's not listed in SE at first call. I remember, we had to had a delay while deployment because some "slow" modules wouldn't be ready otherwise, symptoms look similar. If I don't execute steps 4-6 rapidly, the issue doesn't happen, as if module wasn't really yet when calling "Host - Get Local and ECAT Masters.vi". Following Link might be interesting: https://natinst.lightning.force.com/lightning/r/Knowledge__kav/ka00Z000001DsDEQA0/view

VincentRuault commented 5 years ago

Hi @rtzoeller , In order to support customer, I looked at the code, below. For_GitHub

Only last error is passed and we execute all iterations of the For Loop. We could do 2 things:

    • at least pass the error and not execute last iterations
    • retry to address the error 65700 error. Could we have something like that? For_GitHub_2

Regards

Vincent

VincentRuault commented 5 years ago

Addressed in Pull Request #38