LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Command z_axis by serial communication

Hello,

I would to command my z_axis by using serial communication. I put the command which allows to move the axis in the string for visa write but when I execute the programm my axis didn't move.

I respect the baud rate for my printer, the command is in G-code.

Can you help to know where is the mistake, I can't see it.

Thank you,

0 Kudos
Message 1 of 17
(2,884 Views)

My first guess is that you needed a termination character such as a carriage return or linefeed at the end of the string.

 

Do you really want to run that same command over and over again in a loop as fast as the CPU will allow?  You should probably have that run only once.  Or be a part of an event structure so that it only runs when you press a button.

0 Kudos
Message 2 of 17
(2,874 Views)

I added your remark, but it doesn't work.

0 Kudos
Message 3 of 17
(2,863 Views)

No.  You added a literal backslah and "n" to the message.  You need to put that string constant into \code display (and make the display style visible), then enter \n.

 

And you didn't do what I said with the event structure.  You put it in a timeout case, and there is no timeout value so it will never run.  I said use a button.  If you create a value change event for that button, you can put it in a loop and it will execute every time you press the button.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW

0 Kudos
Message 4 of 17
(2,857 Views)

I don't understand what you said here:"You need to put that string constant into \code display (and make the display style visible), then enter \n."

You mean I should write: "G1 Z-0.005" \n ?

 

0 Kudos
Message 5 of 17
(2,853 Views)

I did thes modifications, I understand what you said. Can you tell me if that you would like to say?

0 Kudos
Message 6 of 17
(2,837 Views)

Nope.  Still a lot to fix.

See the modifications and the notes.

0 Kudos
Message 7 of 17
(2,801 Views)

Thank you for your answer, I tried the programm but it doesn't work, the z axis didn't move.

0 Kudos
Message 8 of 17
(2,757 Views)

Without seeing what your latest code is, knowing what the device is, or having any access to a similar device of my own,  I can't provide anymore help.

 

I suggest you dig into the manual.

0 Kudos
Message 9 of 17
(2,733 Views)

I used the same programm that you sent me, the machine is printer 3D.

0 Kudos
Message 10 of 17
(2,729 Views)