08-16-2023 12:58 AM
Hi guys,
I had taken over the previous code done by my predecessor for the cRIO but the interfacing that he used is not very efficient. In order to write to multiple channels on the NI9403 (32 Channels Digital/Input Output Module), he used a boolean array and indexed the individual values out to write to the Channels which makes the block diagram very big (total of 24 channels).
Solved! Go to Solution.
08-16-2023 01:23 AM
Hi cyongjed,
@cyongjed wrote:
Is there a better solution to interface with Multiple CompactRIO Channels in Scan Mode to write to the DIO Channels as compared to the existing one?
Model used: cRIO 9074
Mode: compactRIO Scan Interface
In FPGA mode you get the option to access the DIO channels of the NI9403 module as U8/U16/U32 value by grouping them like DIO0:7. Then you would need just 2 or 3 IO nodes to acces 24 channels…
As I didn't use the ScanMode on cRIO (too many limitations) I strongly prefer to utilize the FPGA of your cRIO!
08-16-2023 01:29 AM - edited 08-16-2023 01:30 AM
Hi GerdW,
Thank you for the reply. I thought of it too initially, but I have some limitations faced here as the FPGA Module was not purchased by my company they only got the RT Module SSL License. Hence kinda restricted to use the scan mode for now till the next sales purchase renewal with NI.
Are there any other suggestions that you could advise me for this case, please? Thanks!
Regards,
Cyongjed
08-16-2023 03:29 AM
08-16-2023 03:43 AM
I'm not certain but I seem to remember if you right-click on the module and go to its properties there may be an option there to change the mode in scan mode. Worth checking.
08-16-2023 07:40 AM
You can access the I/O programmatically. See the shipping example
<LabVIEW>\examples\CompactRIO\NI Scan Engine\Advanced\Programmatic IO Access - Scan Mode\Programmatic IO Access - Scan Mode.vi
08-16-2023 10:19 AM
Hi ZY,
Thanks for the suggestion. However when I was looking through the examples it is used for all I/O Variables in the Scan Mode. For my case, I only require 24 of them, any suggestions for this please?
Thanks!
08-16-2023 11:19 AM - edited 08-16-2023 11:20 AM
The example uses a for loop to index all elements in the array. You can wire a value to the Loop Count input to force the for loop to run less iteration.