Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Control motor direction using digital control

Dear all,

I am trying to control motor direction (forward and reverse) based on condition. I am reading data from two load cell left and right. 

Currently I am using radio button to control motor direction when stress read from load cell reaches at certain point. For example If I have a fixed cut off value for forward direction +20 as soon the value from load cell reach to value of +20 then motor start moving in another direction (reverse). I tried my best to explain my situation please ask me question if you need further information. I have attached screen shot of my programme. 

Thanks in advance

Tariq
0 Kudos
Message 1 of 6
(4,847 Views)

Hi

I don't know that kind of motor but both frontpanel controls have the same selection so why should it change direction?

greetings from the Netherlands
0 Kudos
Message 2 of 6
(4,835 Views)

Hi, 

 

It is by mistake, the down panel for reversing the motor. It is DC motor. Operating the motor is not an issue but the issue with the current situation is, the condition for forwarding the motor is true for a short time.

Tariq
0 Kudos
Message 3 of 6
(4,832 Views)

Hi Tariq,

 

Can you explain in detail what the exact issue you are facing is? Also how is your DAQ Assistant setup? Is it an AO channel? It might be useful if you comment your code to show why you have used cerain functions like the split 1D array function.

 

Thanks and Regards,

Thanks and Regards,
Supreeth.K

0 Kudos
Message 4 of 6
(4,787 Views)

Hi Supreeth;

 

Thanks for your reply. I think I solved the bit of problem and use two condition for forward and reverse direction of motors and used and gates to set and rest the conditions. But at one point you can see the broken wire would you please help me with this because error said:

These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is 1-D array of
boolean (TRUE or FALSE).
The type of the sink is boolean (TRUE or FALSE).

 

I add the comments.

 

Kind Regards

Tariq
0 Kudos
Message 5 of 6
(4,764 Views)

Hi Tariq,

 

The reason for this is because of the mode you have selected for the 'convert from dynamic data' function. Double click this function and change this to 'single scalar' mode as shown below and this should give you a scalar boolean output as opposed to an array of booleans which you have currently got.

 

Convert from dynamic - mode

 

Hope this helps.

 

Thanks and Regards,

Thanks and Regards,
Supreeth.K

0 Kudos
Message 6 of 6
(4,705 Views)