05-23-2011 10:32 AM
Hello, i would like to ask you about serial port communication. I am currently trying to make application for communication with my stepper motor (Microcon), but it doesnt work. If i try to communicate with original software, my serial port monitor gives me values
IRP_MJ_WRITE when i write some values and
IRP_MJ_READ when i try to read from serial port
But when i am using LabView i am only able to send IRP_MJ_WRITE function using VISA write component (so this one works good), but when i use VISA read component my serial port monitor gives me only IRP_DEVICE_CONTROL. Have you any sugestion where can be problem? I have no idea how to get this IRP_MJ_READ function using LabView VISA component.
Solved! Go to Solution.
05-23-2011 10:47 AM
Are you monitoring the using PortMon software ? Only thing I can see here is that check the command what you send, there might be some space which you might have introduced while typing,
or
Are you still running stepper motor control software while running the labview ? In this case there will be conflict.
When you are using original stepper motor software and when you send command wirte down the hex value (see in portmon or anyother monitoring software) and try sending same hex values using labview. Sending command, sending hex are same but just give it a try,
Use bytes at port function before VISA read to read all the available data.
Search for Microcon drivers in Instrument driver network in NI website if you want easy & fast solution.
05-23-2011 11:14 AM
I am using only original software or labview (so there is no problem). Hex values are the same in both programs. There is no Microcon drived on NI website.
Ok but with thist bytes at port you can have right. But when i use thist function it gives me only zeros.
05-23-2011 11:28 AM
Ok finally your advice leaded to solution. You have right it was because this byte at port. I put this VISA read component intu case structure and i read it only when on serial port are some bytes (bytes at serial port) and this number of bytes i read. And it is working good.
Thank you for thist proposions, it really helped.
05-23-2011 12:01 PM
pls close the thread by clicking on accept this as solution... all the best