Anonymous 11 years
how to write a program communicate with the parallel port mapping and COG? that to control the parallel port output voltage level.
Parallel Port
11 years
If you have a look at the documentation for that module


you will notice the use of IMAGE_COUNT in the interface picture. What you need to do is the replace that with COG_X or COY_Y ... then each of the bits of that variable will be used to activate one pin in the Parallel port.

Because the Parallel port switches pins off and on you use a particular bit within a variable value to indicate if that pin is off or on. Think of it as binary value transmission.

Normally one does not use the Parallel port to transmit the entire value of the COG_X or COG_Y but instead use two lines to indicate left or right. Using the VBScript module you would create a variable that is 1 when left is wanted and 2 when right is wanted. Then you would map bits 1 and 2 of that variable to different pins in the Parallel port. Thus when "left" is wanted pin #1 will be on ...when "right" is wanted pin#2 would be on. Naturally this is a binary mode ... but you can use more pins to communicate more of the values of either variable.

Please include a robo-file if you need futher help.

Anonymous 11 years
thank for your suggestion...
i have some idea after your suggestion.
i make up a pipeline look like the figure shown.
at fact, i am the first time to do a robot and i don't have a good skill for writing VBS program. - _-  Therefore, may i have a similar program about control parallel port for reference.

Thank very much.!

Anonymous 11 years
You've got it about right. The issue is that the Parallel port can only transmit one bit per pin. Thus it depends on how much of the COG_X you need to transmit. Based on your current configuration it will only transmit the first bit of COG_X and the second bit of COG_Y. You probably want to send more bits for each of those variables.

The Line Set COG_X=1 and COG_Y =2 will remove the actual values that are set in the COG module just above this statement.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index