Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

flex_load_dac returns -70006

help
0 Kudos
Message 1 of 8
(4,316 Views)
Dear Sir,

Please make sure that when you call the function in VB you are using the correct Axis resource number. Also check that the Axis that has the DAC you are calling is not configured to be a Servo axis. When manually manipulating the voltage output of a DAC it should not be configured to be a Servo type of axis. Your Flexmotion Software Reference Help Manual can provide you with suggestions, resources and error codes.

Error -70006 is related to a bad resource error. So please check out this suggestions. Good luck!

Regards,

Nestor S.
Nestor
Message 2 of 8
(4,316 Views)
Dear sir,

Thank you really very much for your fast response.

I am trying to use Axis 1, 2 and 3 as servo axis, while axis 4 for DAC purpose only.

I have examined the used manual. It says the same thing not to configure the relevant axis as servo axis. But, it does not say how to do it.

How can I configure axis 4 for DAC purpsed only while configuring other axes as servo axes?

Please suggest.

Regards

Murat Gultekin
0 Kudos
Message 3 of 8
(4,316 Views)

The Axis configuration is done in Measurement & Automation Explorer (MAX). Please read a small tutorial we have on the web about how to do this configuration:

www.ni.com > NI Developer Zone > Development Library > Motion Control > General

Good luck!

Nestor S.

Nestor
0 Kudos
Message 4 of 8
(4,316 Views)
Dear sir,
Thanks again for your interest.
I have read that section many times. I would like to learn how to configure axis 4 for DAC purpose.
There only servo and stepper options in the axis configuration form.
Actually axis configuration section highlights the configuration for servo purpose. There is no indcation for configuration for DAC purpose.
is the following usage true for VB for a boardID 1?

dim status as long
dim input vector as integer
dim value as integer
value = 0
status flex_load_dac(1,4,value,inputVector)

Please help.
Murat
0 Kudos
Message 5 of 8
(4,316 Views)
I believe the program should be:

Dim status as long
Dim boardID as integer
Dim outputValue as integer

boardID = 1 'The board identification number
outputValue = 0 'The DAC output value (Note that is not voltage)

status = flex_load_dac(boardID, &H34, outputValue, &HFF)

The &H34 is the resource associated with the DAC of Axis 4 and inputVector if you are not using onboard variables you give &HFF for returning data to the host. If you have further questions about the resources please check the Flexmotion Software Reference Manual.

Nestor S.
Nestor
0 Kudos
Message 6 of 8
(4,316 Views)
I forgot to add that for DAC purposes you need to configure the Axis for Stepper, since you should not configure it for Servo then your other option is Stepper. There is no DAC configuration as such, it is implied when you configure the axis for Stepper since you release the DAC terminal when doing this.

Hope this helps,

Nestor S.
Nestor
0 Kudos
Message 7 of 8
(4,316 Views)
Dear sir,
The sample code and information you have provided are extremely helpfull and fixed my problems.
Thank you very much indeed.
Best regards
Murat Gultekin
ASELSAN
Turkey
0 Kudos
Message 8 of 8
(4,316 Views)