LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a Simulated DAQ card to communicate with real hardware.

Hi All 

 

I am trying to use a the DAQmx vis to communicate with a Newfocus Picomotor 8742 motion controller, to talk to a series of mirrors. I am creating a digital waveform and each number (1) in the waveform is a step the mirrors make. The issue I have is that I need the DAQmx vis to communicate with this motion controller with an Ethernet connection.

 

Is it possible to use a simulated DAQ card to do this or not?

 

If anyone has any guidance or advice i will greatly appreciate it. 

 

Best Wishes

Andrew 

0 Kudos
Message 1 of 19
(1,542 Views)

I don't think you would need any type of DAQ to control this controller as it has APIs to control over Ethernet/USB/Serial interfaces

 
 

santo_13_2-1628516687733.png

https://www.newport.com/p/8742

 

What made you think you need a DAQ?

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 19
(1,538 Views)

Hi 

 

Thank you for the reply.

 

I thought I would need DAQ because the context of this program is in beam pointing stabilization. This code will measure the distance between a beams target position and the current position, this is passed through a PID controller, the number of steps needed to return the beam to that position is then calculated and is turned into a digital waveform, each 1 in the digital waveform is a picomotor step. 

 

I am aware that the controller has software but this program needs to be able to do this automatically.  

 

Best Wishes 

Andrew

0 Kudos
Message 3 of 19
(1,532 Views)

Hi Andrew,

 

Gotcha, this was a piece of missing information in your original post.

 

Do you already have a DAQ selected for reading the current position? - any more details?

 

Note about simulated hardware - as the name implies it is simulated at the software level to mimic the presence of the same HW up to an extent*, when you use capture functionalities of AI channels it will always provide a sinewave (it cannot mimic your actual application).

 

If would need to mimic your application (reading the current position), you would have to handle it at the application level, but adding case structures around the part where you read the AI/DI signal.

 

Some more details missing

  • Is this going to run on Windows PC or FPGA like a CRIO?
  • How does the current position signal look like, a proportional analog voltage or current or some kind of pulse?
Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 19
(1,519 Views)

Hi Santhosh

 

Thank you for the reply. 

 

The devices that read the beams positions are a three GigE MVC013-20GM cameras from Hikrobot and these are sending data via a ADLINK PCIe-GIE74 frame grabber card. The position in x and y are calculated by using the NI-IMAQ centroid vi (along with other image processing vis). The code in running on PC windows LabVIEW 2018. 

 

Here is an image of the beams position. This is an example of some real data. 

 

AndrewIons01_0-1628521054627.png

 

 I hope this helps

Best Wishes 

Andrew

0 Kudos
Message 5 of 19
(1,505 Views)

I think you could say it looks like a analogue voltage signal, but its not. The only voltage bit, is the digital waveform created by the pulse generation sequence. 

 

Best Wishes 

Andrew

0 Kudos
Message 6 of 19
(1,494 Views)

Hi Andrew,

 

It looks/reads like you already have code working to read the input to your PID loop, and you now want to control the mirrors?

 

Do you already have a PID controller programmed, and just need to connect it to the Newport controller, or do you also need to write that?

 

If I've understood correctly, I'd suggest trying to write some simple(r) code that you control manually using, for example, a front panel control, that will adjust the beam position.

Once you have that working, you can integrate it with the PID loop and pass the input (i.e. target position or direction/motion adjustment) automatically. Write the first bit (front panel control version) to take the same input that you want to use in the PID case.

 

The picomotor manual seems pretty descriptive, personally I'd probably opt for the Ethernet connection but that choice depends on your available sockets etc and also other hardware, the required topography, ... (however, from your description, I'd guess Ethernet is fine).

Chapter 6 gives some information about the format of the text, note that LabVIEW doesn't add line termination characters automatically by default so you have to make sure to explicitly add these.

You can use the TCP Open/Write/Read/Close nodes as appropriate for the messaging.


GCentral
0 Kudos
Message 7 of 19
(1,483 Views)

Hi there 

 

Thank you for the reply, I have a code with a PID (needs programming) but I just need to connect it to the picomotor controller. 

 

I have a code that can operate the Picomotors freely (its not great but it does kind of work, it needs refining), i will add it to my current code. 

 

Yes, I am using the ethernet connection, I am using this approach as it removes the need to use transformation matrices and makes the picomotors move by a relative number of steps. 

 

This approach has been done before by a colleague and I am looking to adopt a similar approach, is this possible?

 

Best Wishes 

Andrew

0 Kudos
Message 8 of 19
(1,451 Views)

I do have another problem, related to this issue, I have made a vi that moves the picomotors freely. It moves untuil the user clicks off of a button but it will excecute the AB command twice, this then gives me an error, how can I make it so it will only execute this AB command once when the motion command has been done. 

 

Best Wishes 

Andrew 

0 Kudos
Message 9 of 19
(1,449 Views)

I expect it's probably doable, yes. How easy it is is harder to say 🙂

 

In the VI you attached, it looks like you have not opposite directions on the same axes for the Mirror 1 - is that intentional? (Right + Down are on axis 1, Up and Left are on axis 2).

 

I think the double action is probably related to your Mechanical Actions (some of these are none default, so perhaps you already know where to change them, but for others, you right click on the Boolean Control and near the bottom there's a "Mechanical Action" menu, and 6 options.

Some of yours are set to "Switch Until Released", which indicates you're holding the mouse down on those and they should probably work how you want.

Others are set to "Latch Until Released", which will trigger the events differently.

 

You could also make use of the Value Change event instead. I attached an example for a possible setup (also using Switch Until Released, following your example).

There's quite a bit of duplication, I would suggest something more robust for a real application, but you can play with it and change the boolean actions and see how it changes the behaviour.

The VI is backsaved to 2018, since I think that was what you used for your VI?


GCentral
0 Kudos
Message 10 of 19
(1,431 Views)