LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send a string to printer.

I have looked all over the internet and couldnt find any simmilar discusion.
In my company we have a Rolland MDX-40 milling machine wich was repurposed to a measuring device.

When connected to the computer the device is recognised as a printer and is connecter to the port USB001 (Virtual printer port or something like that).

The port cannot be changed in any way.

Response from Roland support was i should be recognised as a COM port, after that silence from them.

So my question is is it possible to send a string directly to a printer without generating a report? The report generation changes the initial string and therfore the command send to printer is changed,

0 Kudos
Message 1 of 11
(1,358 Views)

Sounds like your "printer" is a Serial Device and is expecting to get a "Command" (and possibly return a "Status" or "Response").  You'll need to "Read the Darned Manual" for the details.  If you open a Block Diagram, you should be able to see on the Palette a section called "Instrument I/O", which has a sub-section called "Serial".  Do you know the Protocol that your Milling Machine expects?  If it is RS232, you should be good-to-go (and you should be able to run some Test Panels with MAX to make sure things work).

 

Bob Schor

0 Kudos
Message 2 of 11
(1,292 Views)

Mostly Printer Supports PRN data which will be in a specific format and you need to make changes in the PRN data based on your need (Eg: TimeStamp/Serial Number of UUT) and Write the same to Printer using Serial Communication.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 11
(1,260 Views)

The milling machine was repurposed to make magnetic measurements. We got it from a sister company that closed in germany. All that was changed is instead of the knife adaptor we have a hall sonde, so the handling of the machine is the same as original.

 

I have asked the roland company for help all i got was that it should connect to a COM port, however it connects to USB001(virtual printer port).

After my second attempt to comunicate with Roland they went silent.

 

i tryed reinstaling the drives with a couple of different settings no luck...

There is nothing in the manual of the machine to help me.

 

The port USB001 is not recognised the the serial vi.

The device is found by the find printer vi.

 

So my question is is it possible to comunicate with port USB001 without using the report generation toolkit, as it requires to create a report and changes the commands?

 

 

Jernej

0 Kudos
Message 4 of 11
(1,250 Views)

What do you intend to do with that machine :

- To use LabVIEW to communicate ?

- To use the vendor software to communicate ?

- Does it work with vendor software ?

 

In both case you need the driver has to be installed and in most cases only after this the USB port will become a Virtual Com Port.

Up to now I did not find anything related to a communication protocol description in their documentation.

0 Kudos
Message 5 of 11
(1,247 Views)

I intent to use labview to control the movements of the machine.

i have instaled the latest driver from their website.

 

the machine works with vendor software and a visual basic program wich is outdated, so i want to make a program using labview wich we use for other devices

0 Kudos
Message 6 of 11
(1,243 Views)

Is that possible to "copy" what is done in that visual basic program ?

If working it means it has dealed with all your issues.

0 Kudos
Message 7 of 11
(1,227 Views)

working means it came with the machine from germany and they used this program. for the code i will need to ask a coleague who instaled this.

if you need a sample command to send i have it and cen send you now.

0 Kudos
Message 8 of 11
(1,222 Views)

The problem with your description is that it is very unclear. You talk about a printer port but that was traditionally a parallel printer interface on computers that was accessed as LPTx device. Then you have serial ports that are accessed as COMx device. And then you have USB devices which can pretend to be serial devices and they are also accessed as COMx port under Windows. Theoretically you may even have USB devices that pretend to be printer devices but then they would be accessed as LPTx port too under Windows. I have however never seen such a device.

 

Your USBx name you mention would indicate that it is not used as either a standard serial or printer port but instead as something else and then we would at least need to know what API needs to be used with that name.

 

NI VISA does provide access to both COM and LPT devices through the ASRL names. This may sound strange as ASRL stands for asynchronous serial, but it is consistent with Windows, which makes both devices also available through the same serial port API. Windows explanation for this is that COM is bit serial and LPT is byte serial!

 

But without knowing how that USB001 device should be accessed (in Visual Basic or whatever) we can't tell you if VISA is at all a viable solution.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 11
(1,203 Views)

When i instaled the drivers the device was found on printer list in control panel. when using the device from visual basic the device first gets the command on the printer waiting list and when it "prints" the device moves.

 

Labview also finds the device under printer list via Find avalible printers.vi

 

But when i try to send a string labview changes the string before adding it to the waiting list. This is a result of labview needing to create a report.

 

I do not know where to find the API.

 

Jernej

0 Kudos
Message 10 of 11
(1,156 Views)