Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing general purpose digital ports with onboard programming on a 7358 board

Hello

I am currently using a 7358 board with two UMI-7774 in order to command eight stepper motors (although I only have one at the present time).
The motor drive I use has an error output, which I connected first to the fault inputs of the UMI, and it worked fine : the fault led turns on and off properly, disabling the drive whenever there is an error on it. Now what I would like is to get that signal in my Motion program to be detected as a drive fault (I saw there was a function to configure this in the documentation - I am using NI motion 7.0.0 with CVI 7.1). As I could not find which port could be used, I contacted the NI support to get help, where they told me the UMI could not do that : the signal is not forwarded to a digital IO

As my client would like to have both the Led turning on and the software detecting the drive error (and I agree with that), I have to think about a new solution.
- I first thought about just connecting both inputs in parallel but I am not sure of how to wire them so the isolation is not lost.
- The other solution that I have tried is to use onboard programming to forward the signal from a digital input to a digital output, and then wire this output to the fault input of the UMI. I know this seems a bit complicated for not much but I could not do it anyway : I don't know how to use the flex_set_port function onboard : how do I pass the MustOn and MustOff onboard variables (they are calculated properly, I have checked that already)? I know the wiring is working on this one as I can read the error signal from my drive, ant I can control the output properly to turn the fault LED on or off, although I may have messed up the electric isolation too. By the vay, each of the IO of my drive has a completely separate isolation.

I know there is quite a lot of questions in this post, I hope you can help.

Thank you in advance

Christophe



0 Kudos
Message 1 of 5
(3,894 Views)
Update : I upgraded to NI Motion 7.3 with MAX 4.1 using CVI 8.0
I saw there were new useful functions, but I still cannot write to the IO ports from my onboard program, although the variables are following eachother in the stack (MustOn is variable 4 and MustOff is variable 5 for example).

Would anyone have a clue on how to solve this problem?

Thank you in advance for your help

Christophe
0 Kudos
Message 2 of 5
(3,885 Views)
Hi

I finally got to wire the things properly so that I don't need the onboard program (I think the electric isolation might not be as good as it could be, but it will have to do for now).
I am still interested if anyone knows why I could not write data to the io ports from my onboard program though, just in case I might use it in the future...

Christophe
0 Kudos
Message 3 of 5
(3,875 Views)
Hi Xtof,
 
At first glance, I don't see why you shouldn't write to the digital port. Did you try the "Digital Pulses (1Hz) in DO_WHILE Loop" example? Do you have any error returned in this example?
 
0 Kudos
Message 4 of 5
(3,843 Views)
Hi Benjamin,

The reason why I could not do it the same way as in the example is that I wanted to set the bits using a variable, so I thought I should have used a vector (so I put 0 in MustOn and MustOff and passed tha address of my calculated MustOn variable in the vector). In the example, the value of the MustOn and MustOff variables are constants. I suppose it would work if I called the set port function conditionally up to sixteen times (one on and one off per port) with constant values.
Thanks for the hint!

Christophe

0 Kudos
Message 5 of 5
(3,812 Views)